1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Add EP_CGSCCOptimizerLate extension point to PassManagerBuilder

The EP_CGSCCOptimizerLate extension point allows adding CallGraphSCC
passes at the end of the main CallGraphSCC passes and before any
function simplification passes run by CGPassManager.

Patch by Gor Nishanov!

Differential Revision: https://reviews.llvm.org/D22897

llvm-svn: 276953
This commit is contained in:
David Majnemer 2016-07-28 03:28:43 +00:00
parent 05fb746f08
commit 78c8c119e2
2 changed files with 6 additions and 0 deletions

View File

@ -100,6 +100,11 @@ public:
/// peephole optimizations similar to the instruction combiner. These passes
/// will be inserted after each instance of the instruction combiner pass.
EP_Peephole,
/// EP_CGSCCOptimizerLate - This extension point allows adding CallGraphSCC
/// passes at the end of the main CallGraphSCC passes and before any
/// function simplification passes run by CGPassManager.
EP_CGSCCOptimizerLate,
};
/// The Optimization Level - Specify the basic optimization level.

View File

@ -440,6 +440,7 @@ void PassManagerBuilder::populateModulePassManager(
if (OptLevel > 2)
MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
addExtensionsToPM(EP_CGSCCOptimizerLate, MPM);
addFunctionSimplificationPasses(MPM);
// FIXME: This is a HACK! The inliner pass above implicitly creates a CGSCC