Skip to content

Commit 0ebbf72

Browse files
committed
Remove the run-slp-after-loop-vectorization option.
It's been on by default for 4 years and cleans up the pass hierarchy. llvm-svn: 358548
1 parent 5081e41 commit 0ebbf72

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

llvm/lib/Transforms/IPO/PassManagerBuilder.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ RunLoopRerolling("reroll-loops", cl::Hidden,
7272
static cl::opt<bool> RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden,
7373
cl::desc("Run the NewGVN pass"));
7474

75-
static cl::opt<bool>
76-
RunSLPAfterLoopVectorization("run-slp-after-loop-vectorization",
77-
cl::init(true), cl::Hidden,
78-
cl::desc("Run the SLP vectorizer (and BB vectorizer) after the Loop "
79-
"vectorizer instead of before"));
80-
8175
// Experimental option to use CFL-AA
8276
enum class CFLAAType { None, Steensgaard, Andersen, Both };
8377
static cl::opt<CFLAAType>
@@ -425,8 +419,6 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
425419

426420
if (RerollLoops)
427421
MPM.add(createLoopRerollPass());
428-
if (!RunSLPAfterLoopVectorization && SLPVectorize)
429-
MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
430422

431423
MPM.add(createAggressiveDCEPass()); // Delete dead instructions
432424
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
@@ -715,7 +707,7 @@ void PassManagerBuilder::populateModulePassManager(
715707
// before SLP vectorization.
716708
MPM.add(createCFGSimplificationPass(1, true, true, false, true));
717709

718-
if (RunSLPAfterLoopVectorization && SLPVectorize) {
710+
if (SLPVectorize) {
719711
MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
720712
if (OptLevel > 1 && ExtraVectorizerPasses) {
721713
MPM.add(createEarlyCSEPass());
@@ -948,9 +940,8 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
948940
PM.add(createBitTrackingDCEPass());
949941

950942
// More scalar chains could be vectorized due to more alias information
951-
if (RunSLPAfterLoopVectorization)
952-
if (SLPVectorize)
953-
PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
943+
if (SLPVectorize)
944+
PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
954945

955946
// After vectorization, assume intrinsics may tell us more about pointer
956947
// alignments.

0 commit comments

Comments
 (0)