- Use getExitingBlock instead of getExitingBlocks.

- Remove trailing spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakub Staszak 2011-12-18 21:52:30 +00:00
parent 0581ed792b
commit 53ce428646

View File

@ -81,8 +81,8 @@ static void ConnectProlog(Loop *L, Value *TripCount, unsigned Count,
} else {
NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
}
Value *OrigVal = PN->getIncomingValueForBlock(Latch);
Value *V = OrigVal;
Value *V = PN->getIncomingValueForBlock(Latch);
if (Instruction *I = dyn_cast<Instruction>(V)) {
if (L->contains(I)) {
V = LVMap[I];
@ -227,9 +227,7 @@ static void CloneLoopBlocks(Loop *L,
bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI,
LPPassManager *LPM) {
// for now, only unroll loops that contain a single exit
SmallVector<BasicBlock*, 4> ExitingBlocks;
L->getExitingBlocks(ExitingBlocks);
if (ExitingBlocks.size() > 1)
if (!L->getExitingBlock())
return false;
// Make sure the loop is in canonical form, and there is a single