mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-01 12:24:24 +00:00
When deleting a machine instruction, make sure to remove it from the
livevariables information. This fixes several regalloc=local failures on x86 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -659,9 +659,12 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
|||||||
|
|
||||||
// Finally, if this is a noop copy instruction, zap it.
|
// Finally, if this is a noop copy instruction, zap it.
|
||||||
unsigned SrcReg, DstReg;
|
unsigned SrcReg, DstReg;
|
||||||
if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg)
|
if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) {
|
||||||
|
LV->removeVirtualRegistersKilled(MI);
|
||||||
|
LV->removeVirtualRegistersDead(MI);
|
||||||
MBB.erase(MI);
|
MBB.erase(MI);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MachineBasicBlock::iterator MI = MBB.getFirstTerminator();
|
MachineBasicBlock::iterator MI = MBB.getFirstTerminator();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user