We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44a460c commit 867134eCopy full SHA for 867134e
compiler/rustc_codegen_llvm/src/builder/autodiff.rs
@@ -334,6 +334,11 @@ fn generate_enzyme_call<'ll>(
334
let attr = llvm::AttributeKind::NoInline.create_attr(cx.llcx);
335
attributes::apply_to_llfn(ad_fn, Function, &[attr]);
336
337
+ // We add a made-up attribute just such that we can recognize it after AD to update
338
+ // (no)-inline attributes. We'll then also remove this attribute.
339
+ let enzyme_marker_attr = llvm::CreateAttrString(cx.llcx, "enzyme_marker");
340
+ attributes::apply_to_llfn(outer_fn, Function, &[enzyme_marker_attr]);
341
+
342
// first, remove all calls from fnc
343
let entry = llvm::LLVMGetFirstBasicBlock(outer_fn);
344
let br = llvm::LLVMRustGetTerminator(entry);
0 commit comments