add EP_OptimizerLast extension point

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153353 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2012-03-23 23:22:59 +00:00
parent a20689fd7e
commit 1db394921b
2 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,10 @@ public:
/// cleanup-ish optimizations.
EP_ScalarOptimizerLate,
/// EP_OptimizerLast -- This extension point allows adding passes that
/// run after everything else.
EP_OptimizerLast,
/// EP_EnabledOnOptLevel0 - This extension point allows adding passes that
/// should not be disabled by O0 optimization level. The passes will be
/// inserted after the inlining pass.

View File

@ -202,6 +202,7 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
if (OptLevel > 1)
MPM.add(createConstantMergePass()); // Merge dup global constants
}
addExtensionsToPM(EP_OptimizerLast, MPM);
}
void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,