aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-03 00:06:08 +0000
committerChris Lattner <sabre@nondot.org>2006-09-03 00:06:08 +0000
commit2ac0d43fa2cbf2dd1b024a40685eb1b758ddac56 (patch)
treea3bbc361728a03c2253b1adcc23f04bc65124c29
parent7a3abdc63c0cc4e5d5411c3add0e909c6ac49e79 (diff)
downloadexternal_llvm-2ac0d43fa2cbf2dd1b024a40685eb1b758ddac56.zip
external_llvm-2ac0d43fa2cbf2dd1b024a40685eb1b758ddac56.tar.gz
external_llvm-2ac0d43fa2cbf2dd1b024a40685eb1b758ddac56.tar.bz2
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
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index dd8a881..c435c34 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -659,8 +659,11 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
// Finally, if this is a noop copy instruction, zap it.
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);
+ }
}
MachineBasicBlock::iterator MI = MBB.getFirstTerminator();