[llvm] r194966 - Add a loop rerolling flag to the PassManagerBuilder
Hal Finkel
hfinkel at anl.gov
Sun Nov 17 08:02:50 PST 2013
Author: hfinkel
Date: Sun Nov 17 10:02:50 2013
New Revision: 194966
URL: http://llvm.org/viewvc/llvm-project?rev=194966&view=rev
Log:
Add a loop rerolling flag to the PassManagerBuilder
This adds a boolean member variable to the PassManagerBuilder to control loop
rerolling (just like we have for unrolling and the various vectorization
options). This is necessary for control by the frontend. Loop rerolling remains
disabled by default at all optimization levels.
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=194966&r1=194965&r2=194966&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h Sun Nov 17 10:02:50 2013
@@ -112,6 +112,7 @@ public:
bool SLPVectorize;
bool LoopVectorize;
bool LateVectorize;
+ bool RerollLoops;
private:
/// ExtensionList - This is list of all of the extensions that are registered.
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=194966&r1=194965&r2=194966&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Sun Nov 17 10:02:50 2013
@@ -69,6 +69,7 @@ PassManagerBuilder::PassManagerBuilder()
SLPVectorize = RunSLPVectorization;
LoopVectorize = RunLoopVectorization;
LateVectorize = LateVectorization;
+ RerollLoops = RunLoopRerolling;
}
PassManagerBuilder::~PassManagerBuilder() {
@@ -220,7 +221,7 @@ void PassManagerBuilder::populateModuleP
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
- if (RunLoopRerolling)
+ if (RerollLoops)
MPM.add(createLoopRerollPass());
if (SLPVectorize)
MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
More information about the llvm-commits
mailing list