mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-20 11:32:33 +00:00
Delete merged physreg copies in joinReservedPhysReg().
Previously, the identity copy would survive through register allocation before it was removed by the rewriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161269 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
982dc84762
commit
e744ac49f4
@ -1091,6 +1091,11 @@ bool RegisterCoalescer::joinReservedPhysReg(CoalescerPair &CP) {
|
||||
// register live range doesn't need to be accurate as long as all the
|
||||
// defs are there.
|
||||
|
||||
// Delete the identity copy.
|
||||
MachineInstr *CopyMI = MRI->getVRegDef(RHS.reg);
|
||||
LIS->RemoveMachineInstrFromMaps(CopyMI);
|
||||
CopyMI->eraseFromParent();
|
||||
|
||||
// We don't track kills for reserved registers.
|
||||
MRI->clearKillFlags(CP.getSrcReg());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user