mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Change break critical edges to not remove, then insert, PHI node entries.
Instead, just update the BB in-place. This is both faster, and it prevents split-critical-edges from shuffling the PHI argument list unneccesarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f3e808ebf
commit
b01bfd49c3
@ -124,8 +124,8 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
|
||||
// We no longer enter through TIBB, now we come in through NewBB. Revector
|
||||
// exactly one entry in the PHI node that used to come from TIBB to come
|
||||
// from NewBB.
|
||||
Value *InVal = PN->removeIncomingValue(TIBB, false);
|
||||
PN->addIncoming(InVal, NewBB);
|
||||
int BBIdx = PN->getBasicBlockIndex(TIBB);
|
||||
PN->setIncomingBlock(BBIdx, NewBB);
|
||||
}
|
||||
|
||||
// If we don't have a pass object, we can't update anything...
|
||||
|
Loading…
x
Reference in New Issue
Block a user