[LoopUnswitch] Require DominatorTree info.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 22 Sep 2015 00:22:47 +0000 (00:22 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 22 Sep 2015 00:22:47 +0000 (00:22 +0000)
commit9e242e684e8810a89261b6165c33be0d83574fa8
tree92c4fb1f2780defdc5555c7567acf95276906912
parent00051c954c0742b9ba856f7372b9abab8309f660
[LoopUnswitch] Require DominatorTree info.

Summary:
We should either require the DT info to be available, or check if it's
available in every place we use DT (and we already miss such check in
one place, which causes failures in some cases). As other loop passes
preserve DT and it's usually available, it makes sense to just require
it here.

There is no regression test, because the bug only shows up if pass
manager decides to clean DT info right before LoopUnswitch. If
loop-unswitch is run separately, DT is available, so bug isn't exposed.

Reviewers: chandlerc, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13036

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248230 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnswitch.cpp