summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/LoopExtractor.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-05 21:11:53 +0000
committerDan Gohman <gohman@apple.com>2009-11-05 21:11:53 +0000
commita83ac2d9e7b990df6978598d9dec860b5ef13a9a (patch)
treea0ac873f025057cdce7b82ad870f52de16f6e107 /llvm/lib/Transforms/IPO/LoopExtractor.cpp
parent87869bc435c1fb81ae0a3fd5c76becaaa0f90284 (diff)
downloadbcm5719-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/IPO/LoopExtractor.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/LoopExtractor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index fd69aeb00c1..cb813303fac 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -75,6 +75,10 @@ bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &LPM) {
if (L->getParentLoop())
return false;
+ // If LoopSimplify form is not available, stay out of trouble.
+ if (!L->isLoopSimplifyForm())
+ return false;
+
DominatorTree &DT = getAnalysis<DominatorTree>();
bool Changed = false;
OpenPOWER on IntegriCloud