summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Passes
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-10-05 18:36:01 +0000
committerDavide Italiano <davide@freebsd.org>2017-10-05 18:36:01 +0000
commite07072130873f3fb65a827a6397cd7d7684241ca (patch)
tree5666d5856740bab8e518f02ac7fd6b6a9af4e455 /llvm/lib/Passes
parent7c79470c71e1bd2e13ba285710d86269189c5804 (diff)
downloadbcm5719-llvm-e07072130873f3fb65a827a6397cd7d7684241ca.tar.gz
bcm5719-llvm-e07072130873f3fb65a827a6397cd7d7684241ca.zip
[NewPassManager] Run global dead code elimination after the inliner.
This is the same exact change we did for the current pass manager in rL314997, but the new pass manager pipeline already happened to run GlobalOpt after the inliner, so we just insert a run of GDCE here. llvm-svn: 315003
Diffstat (limited to 'llvm/lib/Passes')
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index c9cc0c5ae38..9bf5dbd8e65 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -670,6 +670,7 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
// Optimize globals now that the module is fully simplified.
MPM.addPass(GlobalOptPass());
+ MPM.addPass(GlobalDCEPass());
// Run partial inlining pass to partially inline functions that have
// large bodies.
OpenPOWER on IntegriCloud