projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4e82d1
)
LoopDeletion depends on loops having dedicated exits.
author
Dan Gohman
<gohman@apple.com>
Thu, 5 Nov 2009 21:47:04 +0000
(21:47 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 5 Nov 2009 21:47:04 +0000
(21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86180
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopDeletion.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopDeletion.cpp
b/lib/Transforms/Scalar/LoopDeletion.cpp
index 866d8b41d9de8b5a602bc8c41164a23418ab1962..48817ab9d5ad923f56c15b89fa1122689c5961e5 100644
(file)
--- a/
lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/
lib/Transforms/Scalar/LoopDeletion.cpp
@@
-115,6
+115,10
@@
bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
if (!preheader)
return false;
+ // If LoopSimplify form is not available, stay out of trouble.
+ if (!L->hasDedicatedExits())
+ return false;
+
// We can't remove loops that contain subloops. If the subloops were dead,
// they would already have been removed in earlier executions of this pass.
if (L->begin() != L->end())