diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-05-26 01:24:11 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-05-26 01:24:11 +0000 |
commit | 86248d5632ea7d1cbd4e6dc820662381872cb64d (patch) | |
tree | dad484c6e0cf6f4779b13b9127f55b19900d60c7 | |
parent | f611d873a32d979f0d292a5f040d531e3b53d754 (diff) |
[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.
llvm-svn: 303952
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 5 | ||||
-rw-r--r-- | llvm/test/Other/new-pm-defaults.ll | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index 4845bd2957b3..abc53e97aa72 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -341,10 +341,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, // 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()); diff --git a/llvm/test/Other/new-pm-defaults.ll b/llvm/test/Other/new-pm-defaults.ll index f712dc7b63ca..0ec356392a2d 100644 --- a/llvm/test/Other/new-pm-defaults.ll +++ b/llvm/test/Other/new-pm-defaults.ll @@ -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 |