[llvm-commits] [llvm] r148329 - in /llvm/trunk: include/llvm/Transforms/IPO/PassManagerBuilder.h lib/Transforms/IPO/PassManagerBuilder.cpp
Dan Gohman
gohman at apple.com
Tue Jan 17 12:51:32 PST 2012
Author: djg
Date: Tue Jan 17 14:51:32 2012
New Revision: 148329
URL: http://llvm.org/viewvc/llvm-project?rev=148329&view=rev
Log:
Add a new PassManagerBuilder customization point,
EP_ModuleOptimizerEarly, to allow passes to be added before the
main ModulePass optimizers.
Modified:
llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h?rev=148329&r1=148328&r2=148329&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h Tue Jan 17 14:51:32 2012
@@ -60,6 +60,10 @@
/// out of the frontend.
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
/// the end of the loop optimizer.
EP_LoopOptimizerEnd,
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=148329&r1=148328&r2=148329&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Jan 17 14:51:32 2012
@@ -110,6 +110,8 @@
addInitialAliasAnalysisPasses(MPM);
if (!DisableUnitAtATime) {
+ addExtensionsToPM(EP_ModuleOptimizerEarly, MPM);
+
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
MPM.add(createIPSCCPPass()); // IP SCCP
More information about the llvm-commits
mailing list