cl::desc("Run the Loop vectorization passes"));
static cl::opt<bool>
-RunSLPVectorization("vectorize-slp", cl::desc("Run the SLP vectorization passes"));
+RunSLPVectorization("vectorize-slp",
+ cl::desc("Run the SLP vectorization passes"));
+
+static cl::opt<bool>
+RunBBVectorization("vectorize-slp-aggressive",
+ cl::desc("Run the BB vectorization passes"));
static cl::opt<bool>
UseGVNAfterVectorization("use-gvn-after-vectorization",
DisableSimplifyLibCalls = false;
DisableUnitAtATime = false;
DisableUnrollLoops = false;
+ BBVectorize = RunBBVectorization;
SLPVectorize = RunSLPVectorization;
LoopVectorize = RunLoopVectorization;
}
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
if (SLPVectorize) {
+ MPM.add(createSLPVectorizerPass());
+ MPM.add(createEarlyCSEPass());
+ }
+
+ if (BBVectorize) {
MPM.add(createBBVectorizePass());
MPM.add(createInstructionCombiningPass());
if (OptLevel > 1 && UseGVNAfterVectorization)