@@ -15,7 +15,6 @@ use rustc_middle::mir::BinOp;
15
15
use rustc_middle:: ty:: layout:: { FnAbiOf , HasTyCtxt , HasTypingEnv , LayoutOf } ;
16
16
use rustc_middle:: ty:: { self , GenericArgsRef , Instance , Ty , TyCtxt , TypingEnv } ;
17
17
use rustc_middle:: { bug, span_bug} ;
18
- use rustc_session:: config:: Lto ;
19
18
use rustc_span:: { Span , Symbol , sym} ;
20
19
use rustc_symbol_mangling:: { mangle_internal_symbol, symbol_name_for_instance_in_crate} ;
21
20
use rustc_target:: callconv:: PassMode ;
@@ -26,7 +25,7 @@ use crate::abi::FnAbiLlvmExt;
26
25
use crate :: builder:: Builder ;
27
26
use crate :: builder:: autodiff:: { adjust_activity_to_abi, generate_enzyme_call} ;
28
27
use crate :: context:: CodegenCx ;
29
- use crate :: errors:: { AutoDiffWithoutEnable , AutoDiffWithoutLTO } ;
28
+ use crate :: errors:: AutoDiffWithoutEnable ;
30
29
use crate :: llvm:: { self , Metadata } ;
31
30
use crate :: type_:: Type ;
32
31
use crate :: type_of:: LayoutLlvmExt ;
@@ -1134,10 +1133,6 @@ fn codegen_enzyme_autodiff<'ll, 'tcx>(
1134
1133
let _ = tcx. dcx ( ) . emit_almost_fatal ( AutoDiffWithoutEnable ) ;
1135
1134
}
1136
1135
1137
- if tcx. sess . lto ( ) != Lto :: Fat {
1138
- let _ = tcx. dcx ( ) . emit_almost_fatal ( AutoDiffWithoutLTO ) ;
1139
- }
1140
-
1141
1136
let fn_args = instance. args ;
1142
1137
let callee_ty = instance. ty ( tcx, bx. typing_env ( ) ) ;
1143
1138
0 commit comments