We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f319dd9 commit 9bc0401Copy full SHA for 9bc0401
compiler/rustc_codegen_llvm/src/builder/autodiff.rs
@@ -361,6 +361,11 @@ fn generate_enzyme_call<'ll>(
361
let attr = llvm::AttributeKind::NoInline.create_attr(cx.llcx);
362
attributes::apply_to_llfn(ad_fn, Function, &[attr]);
363
364
+ // We add a made-up attribute just such that we can recognize it after AD to update
365
+ // (no)-inline attributes. We'll then also remove this attribute.
366
+ let enzyme_marker_attr = llvm::CreateAttrString(cx.llcx, "enzyme_marker");
367
+ attributes::apply_to_llfn(outer_fn, Function, &[enzyme_marker_attr]);
368
+
369
// first, remove all calls from fnc
370
let entry = llvm::LLVMGetFirstBasicBlock(outer_fn);
371
let br = llvm::LLVMRustGetTerminator(entry);
0 commit comments