mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Remove unncessary duplication.
llvm-svn: 40979
This commit is contained in:
parent
23c5e2dcd3
commit
b1160475fd
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user