File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
compiler/rustc_codegen_llvm/src/back Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -599,13 +599,11 @@ pub(crate) fn run_pass_manager(
599
599
for function in cx. get_functions ( ) {
600
600
let enzyme_marker = "enzyme_marker" ;
601
601
if attributes:: has_string_attr ( function, enzyme_marker) {
602
- // Sanity check: Ensure 'noinline' is present before replacing it.
603
- assert ! (
604
- attributes:: has_attr( function, Function , llvm:: AttributeKind :: NoInline ) ,
605
- "Expected __enzyme function to have 'noinline' before adding 'alwaysinline'"
606
- ) ;
602
+ // Remove 'noinline' if present (it should be there in most cases)
603
+ if attributes:: has_attr ( function, Function , llvm:: AttributeKind :: NoInline ) {
604
+ attributes:: remove_from_llfn ( function, Function , llvm:: AttributeKind :: NoInline ) ;
605
+ }
607
606
608
- attributes:: remove_from_llfn ( function, Function , llvm:: AttributeKind :: NoInline ) ;
609
607
attributes:: remove_string_attr_from_llfn ( function, enzyme_marker) ;
610
608
611
609
assert ! (
You can’t perform that action at this time.
0 commit comments