[llvm] r188281 - Remove logic that decides whether to vectorize or not depending on O-levels
Arnold Schwaighofer
aschwaighofer at apple.com
Tue Aug 13 08:51:25 PDT 2013
Author: arnolds
Date: Tue Aug 13 10:51:25 2013
New Revision: 188281
URL: http://llvm.org/viewvc/llvm-project?rev=188281&view=rev
Log:
Remove logic that decides whether to vectorize or not depending on O-levels
I have moved this logic into clang and opt.
Modified:
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/trunk/tools/opt/opt.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=188281&r1=188280&r2=188281&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Aug 13 10:51:25 2013
@@ -195,7 +195,7 @@ void PassManagerBuilder::populateModuleP
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
MPM.add(createLoopDeletionPass()); // Delete dead loops
- if (!LateVectorize && LoopVectorize && OptLevel > 1 && SizeLevel < 2)
+ if (!LateVectorize && LoopVectorize)
MPM.add(createLoopVectorizePass());
if (!DisableUnrollLoops)
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=188281&r1=188280&r2=188281&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Tue Aug 13 10:51:25 2013
@@ -451,6 +451,8 @@ static void AddOptimizationPasses(PassMa
Builder.populateFunctionPassManager(FPM);
Builder.populateModulePassManager(MPM);
+
+ Builder.LoopVectorize = OptLevel > 1 && SizeLevel < 2;
}
static void AddStandardCompilePasses(PassManagerBase &PM) {
More information about the llvm-commits
mailing list