forked from OSchip/llvm-project
Add a new PassManagerBuilder customization point,
EP_ModuleOptimizerEarly, to allow passes to be added before the main ModulePass optimizers. llvm-svn: 148329
This commit is contained in:
parent
030b0d77ed
commit
b9936296d3
|
@ -60,6 +60,10 @@ public:
|
||||||
/// out of the frontend.
|
/// out of the frontend.
|
||||||
EP_EarlyAsPossible,
|
EP_EarlyAsPossible,
|
||||||
|
|
||||||
|
/// EP_ModuleOptimizerEarly - This extension point allows adding passes
|
||||||
|
/// just before the main module-level optimization passes.
|
||||||
|
EP_ModuleOptimizerEarly,
|
||||||
|
|
||||||
/// EP_LoopOptimizerEnd - This extension point allows adding loop passes to
|
/// EP_LoopOptimizerEnd - This extension point allows adding loop passes to
|
||||||
/// the end of the loop optimizer.
|
/// the end of the loop optimizer.
|
||||||
EP_LoopOptimizerEnd,
|
EP_LoopOptimizerEnd,
|
||||||
|
|
|
@ -110,6 +110,8 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
|
||||||
addInitialAliasAnalysisPasses(MPM);
|
addInitialAliasAnalysisPasses(MPM);
|
||||||
|
|
||||||
if (!DisableUnitAtATime) {
|
if (!DisableUnitAtATime) {
|
||||||
|
addExtensionsToPM(EP_ModuleOptimizerEarly, MPM);
|
||||||
|
|
||||||
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
|
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
|
||||||
|
|
||||||
MPM.add(createIPSCCPPass()); // IP SCCP
|
MPM.add(createIPSCCPPass()); // IP SCCP
|
||||||
|
|
Loading…
Reference in New Issue