OSDN Git Service

[IRCE] Don't iterate on loops that were cloned out
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 14 Aug 2016 01:04:36 +0000 (01:04 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 14 Aug 2016 01:04:36 +0000 (01:04 +0000)
commit300cd132056b1c9e028055483a4735a52c983f56
treefc11c1063d02d396a71982e3d46c22b773a4d7da
parentabf7d541892c461402981f47d56ba9ac2ad6f64a
[IRCE] Don't iterate on loops that were cloned out

IRCE has the ability to further version pre-loops and post-loops that it
created, but this isn't useful at all.  This change teaches IRCE to
leave behind some metadata in the loops it creates (by cloning the main
loop) so that these new loops are not re-processed by IRCE.

Today this bug is hidden by another bug -- IRCE does not update LoopInfo
properly so the loop pass manager does not re-invoke IRCE on the loops
it split out.  However, once the latter is fixed the bug addressed in
this change causes IRCE to infinite-loop in some cases (e.g. it splits
out a pre-loop, a pre-pre-loop from that, a pre-pre-pre-loop from that
and so on).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278617 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
test/Transforms/IRCE/unhandled.ll