mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-30 20:24:32 +00:00
[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:
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user