Skip to content

Commit

Permalink
Merge pull request #24587 from JuliaLang/vc/opt_level
Browse files Browse the repository at this point in the history
Don't use global opt_level from in addOptimizationPasses
  • Loading branch information
vchuravy authored Nov 13, 2017
2 parents c8f56e9 + ec6d3d2 commit daa58bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, bool dump
}
PM->add(createPropagateJuliaAddrspaces());
PM->add(createTypeBasedAAWrapperPass());
if (jl_options.opt_level >= 3) {
if (opt_level >= 3) {
PM->add(createBasicAAWrapperPass());
}
// list of passes from vmkit
Expand Down Expand Up @@ -238,12 +238,12 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, bool dump
PM->add(createLoopDeletionPass()); // Delete dead loops
PM->add(createJumpThreadingPass()); // Thread jumps

if (jl_options.opt_level >= 3) {
if (opt_level >= 3) {
PM->add(createSLPVectorizerPass()); // Vectorize straight-line code
}

PM->add(createAggressiveDCEPass()); // Delete dead instructions
if (jl_options.opt_level >= 3)
if (opt_level >= 3)
PM->add(createInstructionCombiningPass()); // Clean up after SLP loop vectorizer
PM->add(createLoopVectorizePass()); // Vectorize loops
PM->add(createInstructionCombiningPass()); // Clean up after loop vectorizer
Expand Down

0 comments on commit daa58bb

Please sign in to comment.