summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-23 17:10:01 +0000
committerDan Gohman <gohman@apple.com>2009-10-23 17:10:01 +0000
commit41d00ac45b17946b3fe4f2e2c974a99a7c1191eb (patch)
tree7a218f4f8f1a7ade3cb6e4895b7a00f76623747e /llvm/lib
parent0c78c7aa20f7e025e8b22bdefa9ae2d8803e7f36 (diff)
downloadbcm5719-llvm-41d00ac45b17946b3fe4f2e2c974a99a7c1191eb.tar.gz
bcm5719-llvm-41d00ac45b17946b3fe4f2e2c974a99a7c1191eb.zip
Make LoopDeletion check the maximum backedge taken count, rather than the
exact backedge taken count, when checking for infinite loops. This allows it to delete loops with multiple exit conditions. llvm-svn: 84952
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopDeletion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index 5f93756a05c..8133a06f3f8 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -167,7 +167,7 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
// Don't remove loops for which we can't solve the trip count.
// They could be infinite, in which case we'd be changing program behavior.
ScalarEvolution& SE = getAnalysis<ScalarEvolution>();
- const SCEV *S = SE.getBackedgeTakenCount(L);
+ const SCEV *S = SE.getMaxBackedgeTakenCount(L);
if (isa<SCEVCouldNotCompute>(S))
return Changed;
OpenPOWER on IntegriCloud