diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-10-29 20:49:31 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-10-29 20:49:31 +0000 |
commit | adf38911d8211ba3928bd28e44e4b7a8697e0752 (patch) | |
tree | 7f896d2e3ebedffeddf3728c2553ea9a875a8021 /llvm/lib/Passes | |
parent | 61921f779f78182cb0c070d5a6debf378ef6fbd4 (diff) | |
download | bcm5719-llvm-adf38911d8211ba3928bd28e44e4b7a8697e0752.tar.gz bcm5719-llvm-adf38911d8211ba3928bd28e44e4b7a8697e0752.zip |
[(new) Pass Manager] instantiate SimplifyCFG with the same options as the old PM
The old PM sets the options of what used to be known as "latesimplifycfg" on the
instantiation after the vectorizers have run, so that's what we'redoing here.
FWIW, there's a later SimplifyCFGPass instantiation in both PMs where we do not
set the "late" options. I'm not sure if that's intentional or not.
Differential Revision: https://reviews.llvm.org/D39407
llvm-svn: 316869
Diffstat (limited to 'llvm/lib/Passes')
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index 8796ff56e5e..21d95a07125 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -751,8 +751,13 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level, // Optimize parallel scalar instruction chains into SIMD instructions. OptimizePM.addPass(SLPVectorizerPass()); - // Cleanup after all of the vectorizers. - OptimizePM.addPass(SimplifyCFGPass()); + // Cleanup after all of the vectorizers. Simplification passes like CVP and + // GVN, loop transforms, and others have already run, so it's now better to + // convert to more optimized IR using more aggressive simplify CFG options. + OptimizePM.addPass(SimplifyCFGPass(SimplifyCFGOptions(). + forwardSwitchCondToPhi(true). + convertSwitchToLookupTable(true). + needCanonicalLoops(false))); OptimizePM.addPass(InstCombinePass()); // Unroll small loops to hide loop backedge latency and saturate any parallel |