diff options
author | Davide Italiano <davide@freebsd.org> | 2017-06-03 23:18:29 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-06-03 23:18:29 +0000 |
commit | be1b6a963e9f60cfec2aeef66f5fe68b0409ad71 (patch) | |
tree | 7b967d79d9485eadd4979b071374c507c56a78f3 /llvm/lib/Passes | |
parent | ac76ec7ce8ca13496fb0b061ab882ac459198126 (diff) | |
download | bcm5719-llvm-be1b6a963e9f60cfec2aeef66f5fe68b0409ad71.tar.gz bcm5719-llvm-be1b6a963e9f60cfec2aeef66f5fe68b0409ad71.zip |
[PM] Add GVNSink to the pipeline.
With this, the two pipelines should be in sync again (modulo
LoopUnswitch, but Chandler is actively working on that).
Differential Revision: https://reviews.llvm.org/D33810
llvm-svn: 304671
Diffstat (limited to 'llvm/lib/Passes')
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index 17c60348633..1f638e76830 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -164,6 +164,10 @@ static cl::opt<bool> EnableGVNHoist( "enable-npm-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass for the new PM (default = off)")); +static cl::opt<bool> EnableGVNSink( + "enable-npm-gvn-sink", cl::init(false), cl::Hidden, + cl::desc("Enable the GVN hoisting pass for the new PM (default = off)")); + static Regex DefaultAliasRegex( "^(default|thinlto-pre-link|thinlto|lto-pre-link|lto)<(O[0123sz])>$"); @@ -314,6 +318,12 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, if (EnableGVNHoist) FPM.addPass(GVNHoistPass()); + // Global value numbering based sinking. + if (EnableGVNSink) { + FPM.addPass(GVNSinkPass()); + FPM.addPass(SimplifyCFGPass()); + } + // Speculative execution if the target has divergent branches; otherwise nop. FPM.addPass(SpeculativeExecutionPass()); |