Update various Loop optimization passes to cope with the possibility that

LoopSimplify form may not be available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-11-05 21:11:53 +00:00
parent 7040d6e2f5
commit 03e896bd60
7 changed files with 29 additions and 9 deletions

View File

@ -209,6 +209,10 @@ bool LoopIndexSplit::runOnLoop(Loop *IncomingLoop, LPPassManager &LPM_Ref) {
L = IncomingLoop;
LPM = &LPM_Ref;
// If LoopSimplify form is not available, stay out of trouble.
if (!L->isLoopSimplifyForm())
return false;
// FIXME - Nested loops make dominator info updates tricky.
if (!L->getSubLoops().empty())
return false;