diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-01-26 23:21:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-01-26 23:21:17 +0000 |
commit | e1c01ccd11dd97f01fbb9ad2b0da2b7fd615a54d (patch) | |
tree | 169d0a62d501633118f8a4289932444834cb086a /lib/Passes | |
parent | bf34add9c87491976cfaec6d4b44695e9ee38e9e (diff) |
[PM] Enable the main loop pass pipelines with everything but
loop-unswitch in the main pipelines for the new PM.
All of these now work, and Clang built using this pipeline can build the
test suite and SPEC without hitting any asserts of ASan failures.
There are still some bugs hiding though -- 7 tests regress with the new
PM. I'm going to be investigating these, but it seems worthwhile to at
least get the pipelines in place so that others can play with them, and
they aren't completely broken.
Differential Revision: https://reviews.llvm.org/D29113
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Passes')
-rw-r--r-- | lib/Passes/PassBuilder.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Passes/PassBuilder.cpp b/lib/Passes/PassBuilder.cpp index e26a8e2f1ed6..fcfe3ce9b35e 100644 --- a/lib/Passes/PassBuilder.cpp +++ b/lib/Passes/PassBuilder.cpp @@ -318,19 +318,18 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, // the other we have is `LoopInstSimplify`. LoopPassManager LPM1(DebugLogging), LPM2(DebugLogging); - // FIXME: Enable these when the loop pass manager can support enforcing loop - // simplified and LCSSA form as well as updating the loop nest after - // transformations and we finsih porting the loop passes. -#if 0 // 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 LPM2.addPass(IndVarSimplifyPass()); - LPM2.addPass(LoopIdiomPass()); + LPM2.addPass(LoopIdiomRecognizePass()); LPM2.addPass(LoopDeletionPass()); - LPM2.addPass(SimpleLoopUnrollPass()); -#endif + LPM2.addPass(LoopUnrollPass::createFull()); + FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM1))); FPM.addPass(SimplifyCFGPass()); FPM.addPass(InstCombinePass()); @@ -365,12 +364,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, FPM.addPass(JumpThreadingPass()); FPM.addPass(CorrelatedValuePropagationPass()); FPM.addPass(DSEPass()); - // FIXME: Enable this when the loop pass manager can support enforcing loop - // simplified and LCSSA form as well as updating the loop nest after - // transformations and we finsih porting the loop passes. -#if 0 FPM.addPass(createFunctionToLoopPassAdaptor(LICMPass())); -#endif // Finally, do an expensive DCE pass to catch all the dead code exposed by // the simplifications and basic cleanup after all the simplifications. |