[llvm] r303952 - [PM] Enable the new simple loop unswitch pass in the new pass manager
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 18:24:11 PDT 2017
Author: chandlerc
Date: Thu May 25 20:24:11 2017
New Revision: 303952
URL: http://llvm.org/viewvc/llvm-project?rev=303952&view=rev
Log:
[PM] Enable the new simple loop unswitch pass in the new pass manager
(where it is the only realistic option).
This passes the LLVM test suite for me, but I'm clearly still hammering
on this.
Modified:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/test/Other/new-pm-defaults.ll
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=303952&r1=303951&r2=303952&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Thu May 25 20:24:11 2017
@@ -341,10 +341,7 @@ PassBuilder::buildFunctionSimplification
// Rotate Loop - disable header duplication at -Oz
LPM1.addPass(LoopRotatePass(Level != Oz));
LPM1.addPass(LICMPass());
-#if 0
- // The LoopUnswitch pass isn't yet ported to the new pass manager.
- LPM1.addPass(LoopUnswitchPass(/* OptimizeForSize */ Level != O3));
-#endif
+ LPM1.addPass(SimpleLoopUnswitchPass());
LPM2.addPass(IndVarSimplifyPass());
LPM2.addPass(LoopIdiomRecognizePass());
LPM2.addPass(LoopDeletionPass());
Modified: llvm/trunk/test/Other/new-pm-defaults.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-defaults.ll?rev=303952&r1=303951&r2=303952&view=diff
==============================================================================
--- llvm/trunk/test/Other/new-pm-defaults.ll (original)
+++ llvm/trunk/test/Other/new-pm-defaults.ll Thu May 25 20:24:11 2017
@@ -95,6 +95,7 @@
; CHECK-O-NEXT: Running pass: LoopRotatePass
; CHECK-O-NEXT: Running pass: LICM
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
+; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
; CHECK-O-NEXT: Finished Loop pass manager run.
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
; CHECK-O-NEXT: Running pass: InstCombinePass
More information about the llvm-commits
mailing list