aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-01-17 20:51:32 +0000
committerDan Gohman <gohman@apple.com>2012-01-17 20:51:32 +0000
commit7d4c87ef6eea424b7a28392ea11137ed77b44b57 (patch)
tree364d5c57197a5efd068cf374ef626b69514b6098 /lib
parentbc51e501a0cd3d2bea770d07fe39ea5e87726cb4 (diff)
downloadexternal_llvm-7d4c87ef6eea424b7a28392ea11137ed77b44b57.zip
external_llvm-7d4c87ef6eea424b7a28392ea11137ed77b44b57.tar.gz
external_llvm-7d4c87ef6eea424b7a28392ea11137ed77b44b57.tar.bz2
Add a new PassManagerBuilder customization point,
EP_ModuleOptimizerEarly, to allow passes to be added before the main ModulePass optimizers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/IPO/PassManagerBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp
index f63f532..afd25dc 100644
--- a/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -110,6 +110,8 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
addInitialAliasAnalysisPasses(MPM);
if (!DisableUnitAtATime) {
+ addExtensionsToPM(EP_ModuleOptimizerEarly, MPM);
+
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
MPM.add(createIPSCCPPass()); // IP SCCP