Skip to content

Commit

Permalink
Update CodeGenOpt to CodeGenOptLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Apr 21, 2024
1 parent ff6e155 commit 45ab39a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ void jl_dump_native_impl(void *native_code,
jl_ExecutionEngine->getTargetOptions(),
RelocModel,
CMModel,
CodeGenOpt::Aggressive // -O3 TODO: respect command -O0 flag?
CodeGenOptLevel::Aggressive // -O3 TODO: respect command -O0 flag?
));
fixupTM(*SourceTM);
auto DL = jl_create_datalayout(*SourceTM);
Expand Down
10 changes: 5 additions & 5 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,14 +603,14 @@ jl_value_t *jl_dump_method_asm_impl(jl_method_instance_t *mi, size_t world,
return jl_dump_function_asm(&llvmf_dump, emit_mc, asm_variant, debuginfo, binary, false);
}

CodeGenOpt::Level CodeGenOptLevelFor(int optlevel)
CodeGenOptLevel CodeGenOptLevelFor(int optlevel)
{
#ifdef DISABLE_OPT
return CodeGenOpt::None;
return CodeGenOptLevel::None;
#else
return optlevel < 2 ? CodeGenOpt::None :
optlevel == 2 ? CodeGenOpt::Default :
CodeGenOpt::Aggressive;
return optlevel < 2 ? CodeGenOptLevel::None :
optlevel == 2 ? CodeGenOptLevel::Default :
CodeGenOptLevel::Aggressive;
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/jitlayers.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,4 +642,4 @@ void optimizeDLSyms(Module &M);
// NewPM
#include "passes.h"

CodeGenOpt::Level CodeGenOptLevelFor(int optlevel) JL_NOTSAFEPOINT;
CodeGenOptLevel CodeGenOptLevelFor(int optlevel) JL_NOTSAFEPOINT;

0 comments on commit 45ab39a

Please sign in to comment.