OSDN Git Service

LoopUnroll: Create sub-loops in LoopInfo
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Oct 2014 21:19:00 +0000 (21:19 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Oct 2014 21:19:00 +0000 (21:19 +0000)
commitde7465af346f78a89c61dc182a8c86bf6f576914
treed7b8c115d58489382c36608bdc06ba5097edba1b
parent25cfb5cff50c85bbc193ebe77f82f6065e35c1fc
LoopUnroll: Create sub-loops in LoopInfo

`LoopUnrollPass` says that it preserves `LoopInfo` -- make it so.  In
particular, tell `LoopInfo` about copies of inner loops when unrolling
the outer loop.

Conservatively, also tell `ScalarEvolution` to forget about the original
versions of these loops, since their inputs may have changed.

Fixes PR20987.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219241 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnroll.cpp
test/Transforms/LoopUnroll/update-loop-info-in-subloops.ll [new file with mode: 0644]