Skip to content

Commit 77c13ad

Browse files
committed
Reenable NonTrivial Loop Unswitch
1 parent 2ddbb5a commit 77c13ad

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/codegen.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9073,9 +9073,6 @@ extern "C" void jl_init_llvm(void)
90739073
clopt = llvmopts.lookup("unswitch-threshold");
90749074
if (clopt->getNumOccurrences() == 0)
90759075
cl::ProvidePositionalOption(clopt, "100", 1);
9076-
clopt = llvmopts.lookup("enable-unswitch-cost-multiplier");
9077-
if (clopt->getNumOccurrences() == 0)
9078-
cl::ProvidePositionalOption(clopt, "false", 1);
90799076
#endif
90809077
// if the patch adding this option has been applied, lower its limit to provide
90819078
// better DAGCombiner performance.

src/pipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static void buildFullPipeline(ModulePassManager &MPM, PassBuilder *PB, Optimizat
385385
#endif
386386
LPM2.addPass(LICMPass(LICMOptions()));
387387
JULIA_PASS(LPM2.addPass(JuliaLICMPass()));
388-
LPM2.addPass(SimpleLoopUnswitchPass(false, true));
388+
LPM2.addPass(SimpleLoopUnswitchPass(/*NonTrivial*/true, true));
389389
LPM2.addPass(LICMPass(LICMOptions()));
390390
JULIA_PASS(LPM2.addPass(JuliaLICMPass()));
391391
//LICM needs MemorySSA now, so we must use it

0 commit comments

Comments
 (0)