aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-08-10 00:59:03 +0000
committerDevang Patel <dpatel@apple.com>2007-08-10 00:59:03 +0000
commitacb8c09e27af766688190bc3cef58bef8b7de493 (patch)
tree099c161bae756cd4471bc99084530167970dd059 /lib
parent23a19f82a756e941a55821e73b04b64425ed6d14 (diff)
downloadexternal_llvm-acb8c09e27af766688190bc3cef58bef8b7de493.zip
external_llvm-acb8c09e27af766688190bc3cef58bef8b7de493.tar.gz
external_llvm-acb8c09e27af766688190bc3cef58bef8b7de493.tar.bz2
Remove unncessary duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp
index 8234317..e62fcb9 100644
--- a/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -379,19 +379,6 @@ bool LoopIndexSplit::processOneIterationLoop(SplitInfo &SD, LPPassManager &LPM)
if (SD.SplitCondition->getParent() != Header)
return false;
- // If one of the Header block's successor is not an exit block then this
- // loop is not a suitable candidate.
- BasicBlock *ExitBlock = NULL;
- for (succ_iterator SI = succ_begin(Header), E = succ_end(Header); SI != E; ++SI) {
- if (L->isLoopExit(*SI)) {
- ExitBlock = *SI;
- break;
- }
- }
-
- if (!ExitBlock)
- return false;
-
// If loop header includes loop variant instruction operands then
// this loop may not be eliminated.
if (!safeHeader(SD, Header))
@@ -399,7 +386,7 @@ bool LoopIndexSplit::processOneIterationLoop(SplitInfo &SD, LPPassManager &LPM)
// If Exit block includes loop variant instructions then this
// loop may not be eliminated.
- if (!safeExitBlock(SD, ExitBlock))
+ if (!safeExitBlock(SD, ExitCondition->getParent()))
return false;
// Update CFG.