summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-06-14 20:22:21 +0000
committerTim Northover <tnorthover@apple.com>2013-06-14 20:22:21 +0000
commit059cead5ed7aa11ce1eae0bcc751ea0d1e23ea75 (patch)
tree00c9abb7f59d7ff0ec2c0e35f87153243d20b22a /llvm/lib
parent8ca899c781666cabcbbd3f2ef2ae30983bc3219c (diff)
downloadbcm5719-llvm-059cead5ed7aa11ce1eae0bcc751ea0d1e23ea75.tar.gz
bcm5719-llvm-059cead5ed7aa11ce1eae0bcc751ea0d1e23ea75.zip
Mark rematerialized super/sub registers as dead.
When we're rematerializing into a not-quite-right register we already add the real definition as an imp-def, but we should also be marking the "official" register as dead, since nothing else is going to use it as a result of this remat. Not doing this can affect pressure tracking. rdar://problem/14158833 llvm-svn: 184002
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 82043c2bf7d..7467bb595aa 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -843,6 +843,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
// been asked for. If so it must implicitly define the whole thing.
assert(TargetRegisterInfo::isPhysicalRegister(DstReg) &&
"Only expect virtual or physical registers in remat");
+ NewMI->getOperand(0).setIsDead(true);
NewMI->addOperand(MachineOperand::CreateReg(CopyDstReg,
true /*IsDef*/,
true /*IsImp*/,
OpenPOWER on IntegriCloud