[llvm-commits] [patch] LoopInfo Updater

Andrew Trick atrick at apple.com
Mon Aug 1 23:13:07 PDT 2011


This patch contains an algorithm for incrementally updating LoopInfo within a LoopPassManager. The functionality was missing from the loop passes, and we were lucky enough not to unswitch or unroll particularly interesting loops. We're not so lucky with -disable-iv-rewrite and SCEV-based unrolling, so I'm currently blocked on this patch. 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.

The rough outline is:

- "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.

I'm also providing scevunroll.patch in case anyone wants to run the unit tests in basic.ll. I won't check it in as-is, so no need to review it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: updateunloop.patch
Type: application/octet-stream
Size: 22299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110801/3b1540fa/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scevunroll.patch
Type: application/octet-stream
Size: 10813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110801/3b1540fa/attachment-0001.obj>


More information about the llvm-commits mailing list