diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-03 22:12:51 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-03 22:12:51 +0000 |
commit | 918999db958235516a9ef68fc78bbd2672f080b7 (patch) | |
tree | ff7c16aabfe120e0fbea37a682c35a8b1dd97052 /llvm/lib/CodeGen/RegisterCoalescer.cpp | |
parent | 757640b15625eadd28a4cd6a24c23f66c13db0dc (diff) | |
download | bcm5719-llvm-918999db958235516a9ef68fc78bbd2672f080b7.tar.gz bcm5719-llvm-918999db958235516a9ef68fc78bbd2672f080b7.zip |
Delete merged physreg copies in joinReservedPhysReg().
Previously, the identity copy would survive through register allocation
before it was removed by the rewriter.
llvm-svn: 161269
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 1fcc24d7e0a..990633440e0 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -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()); |