[RS4GC] Minor cleanup to `normalizeForInvokeSafepoint`; NFC

llvm-svn: 250783
This commit is contained in:
Sanjoy Das 2015-10-20 01:06:17 +00:00
parent b1f4a50912
commit ff3dba736a
1 changed files with 3 additions and 3 deletions

View File

@ -1249,14 +1249,14 @@ static BasicBlock *
normalizeForInvokeSafepoint(BasicBlock *BB, BasicBlock *InvokeParent,
DominatorTree &DT) {
BasicBlock *Ret = BB;
if (!BB->getUniquePredecessor()) {
if (!BB->getUniquePredecessor())
Ret = SplitBlockPredecessors(BB, InvokeParent, "", &DT);
}
// Now that 'ret' has unique predecessor we can safely remove all phi nodes
// from it
FoldSingleEntryPHINodes(Ret);
assert(!isa<PHINode>(Ret->begin()));
assert(!isa<PHINode>(Ret->begin()) &&
"All PHI nodes should have been removed!");
// At this point, we can safely insert a gc.relocate as the first instruction
// in Ret if needed.