[llvm] r173730 - Unroll again after running BBVectorize
Hal Finkel
hfinkel at anl.gov
Mon Jan 28 16:22:49 PST 2013
Author: hfinkel
Date: Mon Jan 28 18:22:49 2013
New Revision: 173730
URL: http://llvm.org/viewvc/llvm-project?rev=173730&view=rev
Log:
Unroll again after running BBVectorize
Because BBVectorize may significantly shorten a loop body, unroll
again after vectorization. This is especially important when using
runtime or partial unrolling.
Modified:
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=173730&r1=173729&r2=173730&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Mon Jan 28 18:22:49 2013
@@ -214,6 +214,10 @@ void PassManagerBuilder::populateModuleP
MPM.add(createGVNPass()); // Remove redundancies
else
MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
+
+ // BBVectorize may have significantly shortened a loop body; unroll again.
+ if (!DisableUnrollLoops)
+ MPM.add(createLoopUnrollPass());
}
MPM.add(createAggressiveDCEPass()); // Delete dead instructions
More information about the llvm-commits
mailing list