fix non-enzyme builds
This commit is contained in:
parent
a6e55271fb
commit
21d096184e
3 changed files with 14 additions and 8 deletions
|
@ -551,11 +551,12 @@ pub(crate) unsafe fn llvm_optimize(
|
|||
let vectorize_slp;
|
||||
let vectorize_loop;
|
||||
|
||||
let run_enzyme = cfg!(llvm_enzyme);
|
||||
// When we build rustc with enzyme/autodiff support, we want to postpone size-increasing
|
||||
// optimizations until after differentiation. FIXME(ZuseZ4): Before shipping on nightly,
|
||||
// we should make this more granular, or at least check that the user has at least one autodiff
|
||||
// call in their code, to justify altering the compilation pipeline.
|
||||
if skip_size_increasing_opts && cfg!(llvm_enzyme) {
|
||||
if skip_size_increasing_opts && run_enzyme {
|
||||
unroll_loops = false;
|
||||
vectorize_slp = false;
|
||||
vectorize_loop = false;
|
||||
|
@ -633,6 +634,7 @@ pub(crate) unsafe fn llvm_optimize(
|
|||
vectorize_loop,
|
||||
config.no_builtins,
|
||||
config.emit_lifetime_markers,
|
||||
run_enzyme,
|
||||
sanitizer_options.as_ref(),
|
||||
pgo_gen_path.as_ref().map_or(std::ptr::null(), |s| s.as_ptr()),
|
||||
pgo_use_path.as_ref().map_or(std::ptr::null(), |s| s.as_ptr()),
|
||||
|
|
|
@ -2346,6 +2346,7 @@ unsafe extern "C" {
|
|||
LoopVectorize: bool,
|
||||
DisableSimplifyLibCalls: bool,
|
||||
EmitLifetimeMarkers: bool,
|
||||
RunEnzyme: bool,
|
||||
SanitizerOptions: Option<&SanitizerOptions>,
|
||||
PGOGenPath: *const c_char,
|
||||
PGOUsePath: *const c_char,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue