diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-04-15 05:39:58 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-04-15 05:39:58 +0000 |
commit | 1129a832e6ef5291b0144e9f22c76b2599cd5587 (patch) | |
tree | ced0910ed9b51889bd21eaa8b6eb53b46ef9932d /lib/Transforms | |
parent | 8849838965941919257b923f8603ca1bacd3fa46 (diff) |
Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/PassManagerBuilder.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index d611bed916..60957d2c31 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/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) |