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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194966
91177308-0d34-0410-b5e6-
96231b3b80d8
bool SLPVectorize;
bool LoopVectorize;
bool LateVectorize;
+ bool RerollLoops;
private:
/// ExtensionList - This is list of all of the extensions that are registered.
SLPVectorize = RunSLPVectorization;
LoopVectorize = RunLoopVectorization;
LateVectorize = LateVectorization;
+ RerollLoops = RunLoopRerolling;
}
PassManagerBuilder::~PassManagerBuilder() {
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
- if (RunLoopRerolling)
+ if (RerollLoops)
MPM.add(createLoopRerollPass());
if (SLPVectorize)
MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.