From: Eric Christopher Date: Wed, 17 Apr 2019 02:26:27 +0000 (+0000) Subject: Remove the run-slp-after-loop-vectorization option. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e3ba54932dd5eb6512d68d74ad36e69c3a16c3c;p=llvm Remove the run-slp-after-loop-vectorization option. It's been on by default for 4 years and cleans up the pass hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358548 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index 7491fe06841..cecbccb25de 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -72,12 +72,6 @@ RunLoopRerolling("reroll-loops", cl::Hidden, static cl::opt RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass")); -static cl::opt -RunSLPAfterLoopVectorization("run-slp-after-loop-vectorization", - cl::init(true), cl::Hidden, - cl::desc("Run the SLP vectorizer (and BB vectorizer) after the Loop " - "vectorizer instead of before")); - // Experimental option to use CFL-AA enum class CFLAAType { None, Steensgaard, Andersen, Both }; static cl::opt @@ -425,8 +419,6 @@ void PassManagerBuilder::addFunctionSimplificationPasses( if (RerollLoops) MPM.add(createLoopRerollPass()); - if (!RunSLPAfterLoopVectorization && SLPVectorize) - MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains. MPM.add(createAggressiveDCEPass()); // Delete dead instructions MPM.add(createCFGSimplificationPass()); // Merge & remove BBs @@ -715,7 +707,7 @@ void PassManagerBuilder::populateModulePassManager( // before SLP vectorization. MPM.add(createCFGSimplificationPass(1, true, true, false, true)); - if (RunSLPAfterLoopVectorization && SLPVectorize) { + if (SLPVectorize) { MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains. if (OptLevel > 1 && ExtraVectorizerPasses) { MPM.add(createEarlyCSEPass()); @@ -948,9 +940,8 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) { PM.add(createBitTrackingDCEPass()); // More scalar chains could be vectorized due to more alias information - if (RunSLPAfterLoopVectorization) - if (SLPVectorize) - PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains. + if (SLPVectorize) + PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains. // After vectorization, assume intrinsics may tell us more about pointer // alignments.