aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-03 22:12:51 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-03 22:12:51 +0000
commite744ac49f4cf878e2b34dba26964f04fb0415fa3 (patch)
tree330cd152682bcc4bd9e503dc39f8f675e5f41446 /lib
parent982dc84762fc0c2ca35e6947d648a690dd22343c (diff)
downloadexternal_llvm-e744ac49f4cf878e2b34dba26964f04fb0415fa3.zip
external_llvm-e744ac49f4cf878e2b34dba26964f04fb0415fa3.tar.gz
external_llvm-e744ac49f4cf878e2b34dba26964f04fb0415fa3.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp
index 1fcc24d..9906334 100644
--- a/lib/CodeGen/RegisterCoalescer.cpp
+++ b/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());