mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
0f5d7d1ae5
Summary: This patch fixes https://bugs.llvm.org/show_bug.cgi?id=44611 by preventing an infinite loop in the jump threading pass when -jump-threading-across-loop-headers is on. Specifically, without this patch, jump threading through two basic blocks would trigger on the same area of the CFG over and over, resulting in an infinite loop. Consider testcase PR44611-across-header-hang.ll in this patch. The first opportunity to thread through two basic blocks is: from bb_body2 through bb_header and bb_body1 to bb_body2. The pass duplicates bb_header and bb_body1 as, say, bb_header.thread1 and bb_body1.thread1. Since bb_header contains a successor edge back to itself, bb_header.thread1 also contains a successor edge to bb_header, immediately giving rise to the next jump threading opportunity: from bb_header.thread1 through bb_header and bb_body1 to bb_body2. After that, we repeatedly thread an incoming edge into bb_header through bb_header and bb_body1 to bb_body2. In other words, we keep peeling one iteration from bb_header's self loop. The patch fixes the problem by preventing the pass from duplicating a basic block containing a self loop. Reviewers: wmi, junparser, efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76390 |
||
---|---|---|
.. | ||
2008-11-27-EntryMunge.ll | ||
2010-08-26-and.ll | ||
2011-04-02-SimplifyDeadBlock.ll | ||
2011-04-14-InfLoop.ll | ||
2012-07-19-NoSuccessorIndirectBr.ll | ||
and-and-cond.ll | ||
and-cond.ll | ||
assume-edge-dom.ll | ||
assume.ll | ||
basic.ll | ||
bb-unreachable-from-entry.ll | ||
branch-debug-info.ll | ||
branch-no-const.ll | ||
callbr-edge-split.ll | ||
codesize-loop.ll | ||
combine-metadata.ll | ||
compare.ll | ||
conservative-lvi.ll | ||
crash.ll | ||
ddt-crash2.ll | ||
ddt-crash3.ll | ||
ddt-crash4.ll | ||
ddt-crash.ll | ||
degenerate-phi.ll | ||
fold-not-thread.ll | ||
guards.ll | ||
header-succ.ll | ||
implied-cond.ll | ||
indirectbr.ll | ||
induction.ll | ||
landing-pad.ll | ||
loop-phi.ll | ||
lvi-load.ll | ||
lvi-tristate.ll | ||
ne-undef.ll | ||
no-irreducible-loops.ll | ||
or-undef.ll | ||
phi-eq.ll | ||
phi-known.ll | ||
pr9331.ll | ||
pr15851_hang.ll | ||
pr22086.ll | ||
pr26096.ll | ||
pr27840.ll | ||
pr33605.ll | ||
pr33917.ll | ||
pr36133.ll | ||
pr40992-indirectbr-folding.ll | ||
PR33357-lvi-recursion.ll | ||
PR37745.ll | ||
PR44611-across-header-hang.ll | ||
range-compare.ll | ||
redundant-dbg-info.ll | ||
removed-use.ll | ||
select.ll | ||
stale-loop-info-after-unfold-select.ll | ||
static-profile.ll | ||
thread-cmp.ll | ||
thread-loads.ll | ||
thread-two-bbs1.ll | ||
thread-two-bbs2.ll | ||
thread-two-bbs3.ll | ||
thread-two-bbs4.ll | ||
thread-two-bbs5.ll | ||
thread-two-bbs6.ll | ||
threading_prof1.ll | ||
threading_prof2.ll | ||
unreachable-loops.ll | ||
update-edge-weight.ll |