summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-06-17 16:23:34 +0000
committerNadav Rotem <nrotem@apple.com>2013-06-17 16:23:34 +0000
commit7dd8210b71863f57cb40a7ea7a2aa1128491cd25 (patch)
tree54c52bb0fc222bd61b537577e24d892172808dc4 /llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
parentac5c1b0d6826cbff0afce00f7cf3d8657112a6a3 (diff)
downloadbcm5719-llvm-7dd8210b71863f57cb40a7ea7a2aa1128491cd25.tar.gz
bcm5719-llvm-7dd8210b71863f57cb40a7ea7a2aa1128491cd25.zip
Enable the loop vectorizer by default for -Os and -O2.
llvm-svn: 184084
Diffstat (limited to 'llvm/lib/Transforms/IPO/PassManagerBuilder.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index 8ed7704d5a0..0ad45ec1bf2 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -32,12 +32,6 @@ static cl::opt<bool>
RunLoopVectorization("vectorize-loops",
cl::desc("Run the Loop vectorization passes"));
-// This is a helper flag that we use for testing the profitability of
-// vectorization on -O2 and -Os. It should go away once we make a decision.
-static cl::opt<bool>
-VectorizeO2("vectorize-o2",
- cl::desc("Enable vectorization on all O levels"));
-
static cl::opt<bool>
RunSLPVectorization("vectorize-slp",
cl::desc("Run the SLP vectorization passes"));
@@ -198,7 +192,7 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
MPM.add(createLoopDeletionPass()); // Delete dead loops
- if (LoopVectorize && (OptLevel > 2 || VectorizeO2))
+ if (LoopVectorize && (OptLevel > 1))
MPM.add(createLoopVectorizePass());
if (!DisableUnrollLoops)
OpenPOWER on IntegriCloud