summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-04-15 05:39:58 +0000
committerNadav Rotem <nrotem@apple.com>2013-04-15 05:39:58 +0000
commitd4dcc003df2eed9a600277e72d24460491f25f93 (patch)
tree9041f7cc8f93d8e01a5e1f0dc62cfdcdf6046589 /llvm/lib/Transforms
parent6a0dd6b78cc387a9e0fd01e267e3f1590900ee88 (diff)
downloadbcm5719-llvm-d4dcc003df2eed9a600277e72d24460491f25f93.tar.gz
bcm5719-llvm-d4dcc003df2eed9a600277e72d24460491f25f93.zip
Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
llvm-svn: 179508
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index d611bed9168..60957d2c314 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -33,7 +33,12 @@ RunLoopVectorization("vectorize-loops",
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",
@@ -52,6 +57,7 @@ PassManagerBuilder::PassManagerBuilder() {
DisableSimplifyLibCalls = false;
DisableUnitAtATime = false;
DisableUnrollLoops = false;
+ BBVectorize = RunBBVectorization;
SLPVectorize = RunSLPVectorization;
LoopVectorize = RunLoopVectorization;
}
@@ -208,6 +214,11 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
if (SLPVectorize) {
+ MPM.add(createSLPVectorizerPass());
+ MPM.add(createEarlyCSEPass());
+ }
+
+ if (BBVectorize) {
MPM.add(createBBVectorizePass());
MPM.add(createInstructionCombiningPass());
if (OptLevel > 1 && UseGVNAfterVectorization)
OpenPOWER on IntegriCloud