[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Philip Reames
2015-02-28 01:57:44 +00:00
parent af690c9cd3
commit 63dff88c76

View File

@ -838,7 +838,9 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache,
assert(!isKnownBaseResult(v) && "why did it get added?");
assert(!state.isUnknown() && "Optimistic algorithm didn't complete!");
if (state.isConflict()) {
if (!state.isConflict())
continue;
if (PHINode *basephi = dyn_cast<PHINode>(state.getBase())) {
PHINode *phi = cast<PHINode>(v);
unsigned NumPHIValues = phi->getNumIncomingValues();
@ -903,7 +905,8 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache,
basephi->addIncoming(base, InBB);
}
assert(basephi->getNumIncomingValues() == NumPHIValues);
} else if (SelectInst *basesel = dyn_cast<SelectInst>(state.getBase())) {
} else {
SelectInst *basesel = cast<SelectInst>(state.getBase());
SelectInst *sel = cast<SelectInst>(v);
// Operand 1 & 2 are true, false path respectively. TODO: refactor to
// something more safe and less hacky.
@ -927,8 +930,6 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache,
}
basesel->setOperand(i, base);
}
} else
llvm_unreachable("unexpected conflict type");
}
}