forked from OSchip/llvm-project
6827de19b2
Summary: Specifically, when we perform runtime loop unrolling of a loop that contains a convergent op, we can only unroll k times, where k divides the loop trip multiple. Without this change, we'll happily unroll e.g. the following loop for (int i = 0; i < N; ++i) { if (i == 0) convergent_op(); foo(); } into int i = 0; if (N % 2 == 1) { convergent_op(); foo(); ++i; } for (; i < N - 1; i += 2) { if (i == 0) convergent_op(); foo(); foo(); }. This is unsafe, because we've just added a control-flow dependency to the convergent op in the prelude. In general, runtime unrolling loops that contain convergent ops is safe only if we don't have emit a prelude, which occurs when the unroll count divides the trip multiple. Reviewers: resistor Subscribers: llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D17526 llvm-svn: 263509 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
PowerPC | ||
X86 | ||
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 | ||
2007-05-09-UnknownTripCount.ll | ||
2007-11-05-Crash.ll | ||
2011-08-08-PhiUpdate.ll | ||
2011-08-09-IVSimplify.ll | ||
2011-08-09-PhiUpdate.ll | ||
2011-10-01-NoopTrunc.ll | ||
2012-04-09-unroll-indirectbr.ll | ||
basic.ll | ||
convergent.ll | ||
ephemeral.ll | ||
full-unroll-bad-cost.ll | ||
full-unroll-crashers.ll | ||
full-unroll-heuristics-2.ll | ||
full-unroll-heuristics-cmp.ll | ||
full-unroll-heuristics-phi-prop.ll | ||
full-unroll-heuristics.ll | ||
high-cost-trip-count-computation.ll | ||
ignore-annotation-intrinsic-cost.ll | ||
loop-remarks.ll | ||
nsw-tripcount.ll | ||
partial-unroll-optsize.ll | ||
pr10813.ll | ||
pr11361.ll | ||
pr14167.ll | ||
pr18861.ll | ||
rebuild_lcssa.ll | ||
runtime-loop.ll | ||
runtime-loop1.ll | ||
runtime-loop2.ll | ||
runtime-loop3.ll | ||
runtime-loop4.ll | ||
runtime-loop5.ll | ||
scevunroll.ll | ||
shifted-tripcount.ll | ||
tripcount-overflow.ll | ||
unloop.ll | ||
unroll-cleanup.ll | ||
unroll-pragmas-disabled.ll | ||
unroll-pragmas.ll | ||
update-loop-info-in-subloops.ll |