An algorithm for incrementally updating LoopInfo within a
authorAndrew Trick <atrick@apple.com>
Wed, 3 Aug 2011 23:50:25 +0000 (23:50 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 3 Aug 2011 23:50:25 +0000 (23:50 +0000)
commit762797d1af1b9308c79982aedd9bd2f585f46171
tree917a9631c984910d0d49c1cb1c757f8e7e9c65ac
parent882bcc662d389211cdfc7e2c108a60b7a03128d1
An algorithm for incrementally updating LoopInfo within a
LoopPassManager. The incremental update should be extremely cheap in
most cases and can be used in places where it's not feasible to
regenerate the entire loop forest.

- "Unloop" is a node in the loop tree whose last backedge has been removed.
- Perform reverse dataflow on the block inside Unloop to propagate the
  nearest loop from the block's successors.
- For reducible CFG, each block in unloop is visited exactly
  once. This is because unloop no longer has a backedge and blocks
  within subloops don't change parents.
- Immediate subloops are summarized by the nearest loop reachable from
  their exits or exits within nested subloops.
- At completion the unloop blocks each have a new parent loop, and
  each immediate subloop has a new parent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136844 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopInfo.h
lib/Analysis/LoopInfo.cpp
lib/Analysis/LoopPass.cpp