llvm-project/llvm/test/Transforms/LoopUnroll
Chandler Carruth 87adb7a2e2 [Unroll] Improve the brute force loop unroll estimate by propagating
through PHI nodes across iterations.

This patch teaches the new advanced loop unrolling heuristics to propagate
constants into the loop from the preheader and around the backedge after
simulating each iteration. This lets us brute force solve simple recurrances
that aren't modeled effectively by SCEV. It also makes it more clear why we
need to process the loop in-order rather than bottom-up which might otherwise
make much more sense (for example, for DCE).

This came out of an attempt I'm making to develop a principled way to account
for dead code in the unroll estimation. When I implemented
a forward-propagating version of that it produced incorrect results due to
failing to propagate *cost* between loop iterations through the PHI nodes, and
it occured to me we really should at least propagate simplifications across
those edges, and it is quite easy thanks to the loop being in canonical and
LCSSA form.

Differential Revision: http://reviews.llvm.org/D11706

llvm-svn: 243900
2015-08-03 20:32:27 +00:00
..
AArch64 [AArch64] Enable partial & runtime unrolling on cortex-a57 2015-03-09 06:14:28 +00:00
PowerPC [PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2 2015-05-21 20:30:23 +00:00
X86 Roll forward r243250 2015-07-26 19:10:03 +00:00
2004-05-13-DontUnrollTooMuch.ll
2005-03-06-BadLoopInfoUpdate.ll
2006-08-24-MultiBlockLoop.ll
2007-04-16-PhiUpdate.ll
2007-05-05-UnrollMiscomp.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
2007-05-09-UnknownTripCount.ll
2007-11-05-Crash.ll
2011-08-08-PhiUpdate.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2011-08-09-IVSimplify.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2011-08-09-PhiUpdate.ll
2011-10-01-NoopTrunc.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2012-04-09-unroll-indirectbr.ll
basic.ll
ephemeral.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
full-unroll-bad-cost.ll [LoopUnroll] Fix truncation bug in canUnrollCompletely. 2015-06-06 05:24:10 +00:00
full-unroll-crashers.ll [Unroll] Handle SwitchInst properly. 2015-07-29 18:10:33 +00:00
full-unroll-heuristics-cast.ll Tidy-up test case from r242257. 2015-07-15 01:51:51 +00:00
full-unroll-heuristics-cmp.ll Handle resolvable branches in complete loop unroll heuristic. 2015-07-24 01:53:04 +00:00
full-unroll-heuristics-phi-prop.ll [Unroll] Improve the brute force loop unroll estimate by propagating 2015-08-03 20:32:27 +00:00
full-unroll-heuristics.ll [Unroll] Rework the naming and structure of the new unroll heuristics. 2015-06-05 17:01:43 +00:00
high-cost-trip-count-computation.ll [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
ignore-annotation-intrinsic-cost.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
loop-remarks.ll
nsw-tripcount.ll [SCEV] Improve Scalar Evolution's use of no {un,}signed wrap flags 2014-10-31 11:40:32 +00:00
partial-unroll-optsize.ll [LoopUnroll] Fix the partial unrolling threshold for small loop sizes 2015-01-10 00:30:55 +00:00
pr10813.ll
pr11361.ll
pr14167.ll
pr18861.ll
runtime-loop.ll [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
runtime-loop1.ll Set proper debug location for branch added in BasicBlock::splitBasicBlock(). 2015-06-11 18:25:54 +00:00
runtime-loop2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
runtime-loop3.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
runtime-loop4.ll [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
runtime-loop5.ll [LoopUnrollRuntime] Clean up a predicate. 2015-04-12 01:24:01 +00:00
scevunroll.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
shifted-tripcount.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
tripcount-overflow.ll Partial fix for bug 22589 2015-02-18 19:32:25 +00:00
unloop.ll
unroll-cleanup.ll Add another InstCombine pass after LoopUnroll. 2015-05-14 22:02:54 +00:00
unroll-pragmas-disabled.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
unroll-pragmas.ll Enable runtime unrolling with unroll pragma metadata 2015-07-13 18:26:27 +00:00
update-loop-info-in-subloops.ll LoopUnroll: Create sub-loops in LoopInfo 2014-10-07 21:19:00 +00:00