diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-05 21:11:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-05 21:11:53 +0000 |
commit | a83ac2d9e7b990df6978598d9dec860b5ef13a9a (patch) | |
tree | a0ac873f025057cdce7b82ad870f52de16f6e107 /llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp | |
parent | 87869bc435c1fb81ae0a3fd5c76becaaa0f90284 (diff) | |
download | bcm5719-llvm-a83ac2d9e7b990df6978598d9dec860b5ef13a9a.tar.gz bcm5719-llvm-a83ac2d9e7b990df6978598d9dec860b5ef13a9a.zip |
Update various Loop optimization passes to cope with the possibility that
LoopSimplify form may not be available.
llvm-svn: 86175
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 920d85c8b65..8b6a2334315 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -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; |