LoopRotation: Make the brute force DomTree update more brute force.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Sep 2012 11:57:22 +0000 (11:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Sep 2012 11:57:22 +0000 (11:57 +0000)
commit7de7078933292b0487f1f39f539bece922e3dde5
treecb8374fa628d864571eef888bac2ef34d768a6b0
parent43bf70986bb13c812e87ca959dd8f2dd9edf802c
LoopRotation: Make the brute force DomTree update more brute force.

We update until we hit a fixpoint. This is probably slow but also
slightly simplifies the code. It should also fix the occasional
invalid domtrees observed when building with expensive checking.

I couldn't find a case where this had a measurable slowdown, but
if someone finds a pathological case where it does we may have
to find a cleverer way of updating dominators here.

Thanks to Duncan for the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163091 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRotation.cpp
test/Transforms/LoopRotate/multiple-exits.ll