File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
compiler/rustc_codegen_llvm/src/builder Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,13 @@ fn generate_enzyme_call<'ll>(
334334 let attr = llvm:: AttributeKind :: NoInline . create_attr ( cx. llcx ) ;
335335 attributes:: apply_to_llfn ( ad_fn, Function , & [ attr] ) ;
336336
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+ //Some(llvm::CreateAttrStringValue(cx.llcx, "no-jump-tables", "true"))
341+ // &llvm::ffi::Attribute
342+ attributes:: apply_to_llfn ( outer_fn, Function , & [ enzyme_marker_attr] ) ;
343+
337344 // first, remove all calls from fnc
338345 let entry = llvm:: LLVMGetFirstBasicBlock ( outer_fn) ;
339346 let br = llvm:: LLVMRustGetTerminator ( entry) ;
You can’t perform that action at this time.
0 commit comments