[PATCH] D15995: [LTO] Add a run of LoopUnroll
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 05:44:20 PST 2016
jmolloy updated this revision to Diff 44626.
Repository:
rL LLVM
http://reviews.llvm.org/D15995
Files:
lib/Transforms/IPO/PassManagerBuilder.cpp
Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -570,10 +570,15 @@
// More loops are countable; try to optimize them.
PM.add(createIndVarSimplifyPass());
PM.add(createLoopDeletionPass());
+ if (!DisableUnrollLoops)
+ PM.add(createSimpleLoopUnrollPass()); // Unroll small loops
if (EnableLoopInterchange)
PM.add(createLoopInterchangePass());
PM.add(createLoopVectorizePass(true, LoopVectorize));
+ // The vectorizer may have significantly shortened a loop body; unroll again.
+ if (!DisableUnrollLoops)
+ PM.add(createLoopUnrollPass());
// Now that we've optimized loops (in particular loop induction variables),
// we may have exposed more scalar opportunities. Run parts of the scalar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15995.44626.patch
Type: text/x-patch
Size: 891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160112/00d2d99d/attachment.bin>
More information about the llvm-commits
mailing list