diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-12 23:14:07 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-12 23:14:07 +0000 |
commit | f0704d28f34b872f949ef8030651c7159ff6f32f (patch) | |
tree | a128a2711edac9e547bc25ba344544b1cccbfc0b /lib | |
parent | 12a40314a91511b65bc83782fd5a3e981331adb1 (diff) | |
download | external_llvm-f0704d28f34b872f949ef8030651c7159ff6f32f.zip external_llvm-f0704d28f34b872f949ef8030651c7159ff6f32f.tar.gz external_llvm-f0704d28f34b872f949ef8030651c7159ff6f32f.tar.bz2 |
Don't emit a DBG_VALUE for a spill slot that the rewriter decided not to use after all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/LiveDebugVariables.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp index fc6275f..b2aaa8e 100644 --- a/lib/CodeGen/LiveDebugVariables.cpp +++ b/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 { |