[llvm-commits] [llvm] r40979 - /llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Devang Patel
dpatel at apple.com
Thu Aug 9 17:59:03 PDT 2007
Author: dpatel
Date: Thu Aug 9 19:59:03 2007
New Revision: 40979
URL: http://llvm.org/viewvc/llvm-project?rev=40979&view=rev
Log:
Remove unncessary duplication.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=40979&r1=40978&r2=40979&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Thu Aug 9 19:59:03 2007
@@ -379,19 +379,6 @@
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 @@
// 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.
More information about the llvm-commits
mailing list