[PATCH] D15995: [LTO] Add a run of LoopUnroll
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 07:29:49 PST 2016
jmolloy created this revision.
jmolloy added a reviewer: joker.eph.
jmolloy added a subscriber: llvm-commits.
jmolloy set the repository for this revision to rL LLVM.
Herald added a subscriber: joker.eph.
Loop trip counts can often be resolved during LTO. We should obviously be unrolling small loops once those trip counts have been resolved, but we weren't.
This causes no change in a -flto run of the test-suite for me, but the nature of fully unrolling loops is that when they trigger, they cause massive changes in runtime. We observe this on third party test suites.
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,6 +570,8 @@
// 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());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15995.44329.patch
Type: text/x-patch
Size: 528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160108/749f4df7/attachment.bin>
More information about the llvm-commits
mailing list