[llvm] r293067 - Add loop pass insertion point EP_LateLoopOptimizations
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 08:12:26 PST 2017
Author: kparzysz
Date: Wed Jan 25 10:12:25 2017
New Revision: 293067
URL: http://llvm.org/viewvc/llvm-project?rev=293067&view=rev
Log:
Add loop pass insertion point EP_LateLoopOptimizations
Differential Revision: https://reviews.llvm.org/D28694
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=293067&r1=293066&r2=293067&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h Wed Jan 25 10:12:25 2017
@@ -101,6 +101,14 @@ public:
/// will be inserted after each instance of the instruction combiner pass.
EP_Peephole,
+ /// EP_LateLoopOptimizations - This extension point allows adding late loop
+ /// canonicalization and simplification passes. This is the last point in
+ /// the loop optimization pipeline before loop deletion. Each pass added
+ /// here must be an instance of LoopPass.
+ /// This is the place to add passes that can remove loops, such as target-
+ /// specific loop idiom recognition.
+ EP_LateLoopOptimizations,
+
/// 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.
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=293067&r1=293066&r2=293067&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Wed Jan 25 10:12:25 2017
@@ -316,7 +316,9 @@ void PassManagerBuilder::addFunctionSimp
addInstructionCombiningPass(MPM);
MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
+ addExtensionsToPM(EP_LateLoopOptimizations, MPM);
MPM.add(createLoopDeletionPass()); // Delete dead loops
+
if (EnableLoopInterchange) {
MPM.add(createLoopInterchangePass()); // Interchange loops
MPM.add(createCFGSimplificationPass());
More information about the llvm-commits
mailing list