Allow loop unrolling to get known trip counts from ScalarEvolution.
authorAndrew Trick <atrick@apple.com>
Thu, 11 Aug 2011 23:36:16 +0000 (23:36 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 11 Aug 2011 23:36:16 +0000 (23:36 +0000)
commitb1831c66403315a1d84593b7c198ddbd43a574cf
treeb3b6948180fe88ddd54f5a0ea1f3ce0d48e72ce4
parent8facc7def811aeb3db20233de0aef1c69f0d1922
Allow loop unrolling to get known trip counts from ScalarEvolution.

SCEV unrolling can unroll loops with arbitrary induction variables. It
is a prerequisite for -disable-iv-rewrite performance. It is also
easily handles loops of arbitrary structure including multiple exits
and is generally more robust.

This is under a temporary option to avoid affecting default
behavior for the next couple of weeks. It is needed so that I can
checkin unit tests for updateUnloop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137384 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/scevunroll.ll [new file with mode: 0644]