mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
If a MachineBasicBlock has multiple ways of reaching another block,
allow it to have multiple CFG edges to that block. This is needed to allow MachineBasicBlock::isOnlyReachableByFallthrough to work correctly. This fixes PR4126. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -305,11 +305,9 @@ void MachineBasicBlock::ReplaceUsesOfBlockWith(MachineBasicBlock *Old,
|
||||
I->getOperand(i).setMBB(New);
|
||||
}
|
||||
|
||||
// Update the successor information. If New was already a successor, just
|
||||
// remove the link to Old instead of creating another one. PR 1444.
|
||||
// Update the successor information.
|
||||
removeSuccessor(Old);
|
||||
if (!isSuccessor(New))
|
||||
addSuccessor(New);
|
||||
addSuccessor(New);
|
||||
}
|
||||
|
||||
/// CorrectExtraCFGEdges - Various pieces of code can cause excess edges in the
|
||||
|
||||
Reference in New Issue
Block a user