summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-12 23:14:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-12 23:14:07 +0000
commite63dfeee36fdc4c83b1d68d3e8b727da4f9916b9 (patch)
treefd7736d3e03ceb4f2b8b0eb5d704995b8664d2f2 /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent2ffee66e10ec91a84d3e62b213b3d674723596d8 (diff)
downloadbcm5719-llvm-e63dfeee36fdc4c83b1d68d3e8b727da4f9916b9.tar.gz
bcm5719-llvm-e63dfeee36fdc4c83b1d68d3e8b727da4f9916b9.zip
Don't emit a DBG_VALUE for a spill slot that the rewriter decided not to use after all.
llvm-svn: 123339
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugVariables.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp
index fc6275fa5e6..b2aaa8e46a4 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.cpp
+++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp
@@ -568,7 +568,8 @@ UserValue::rewriteLocations(VirtRegMap &VRM, const TargetRegisterInfo &TRI) {
if (VRM.isAssignedReg(VirtReg) &&
TargetRegisterInfo::isPhysicalRegister(VRM.getPhys(VirtReg))) {
Loc.substPhysReg(VRM.getPhys(VirtReg), TRI);
- } else if (VRM.getStackSlot(VirtReg) != VirtRegMap::NO_STACK_SLOT) {
+ } else if (VRM.getStackSlot(VirtReg) != VirtRegMap::NO_STACK_SLOT &&
+ VRM.isSpillSlotUsed(VRM.getStackSlot(VirtReg))) {
// FIXME: Translate SubIdx to a stackslot offset.
Loc = MachineOperand::CreateFI(VRM.getStackSlot(VirtReg));
} else {
OpenPOWER on IntegriCloud