aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2022-03-17 14:03:22 +0000
committerJeremy Morse <jeremy.morse@sony.com>2022-03-17 14:26:15 +0000
commit12a2f7494e745eb4c90133ea17cadac3a8eb8d07 (patch)
tree6232d81d622b3e7420da8b46eed8ffd2a412d760 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parentbf1a99861c2e98cfd85792fdefe2ef9c7ec11f52 (diff)
downloadllvm-12a2f7494e745eb4c90133ea17cadac3a8eb8d07.zip
llvm-12a2f7494e745eb4c90133ea17cadac3a8eb8d07.tar.gz
llvm-12a2f7494e745eb4c90133ea17cadac3a8eb8d07.tar.bz2
[DebugInfo][InstrRef] Prefer stack locations for variables
This patch adjusts what location is picked for a known variable value -- preferring to leave locations on the stack, even when a value is re-loaded into a register. The benefit is reduced location list entropy, on a clang-3.4 build I found that .debug_loclists reduces in size by 6%, from 29Mb down to 27Mb. Testing: a few tests need the stack slot to be written to explicitly, to force LiveDebugValues into restoring the variable location to a register. I've added an explicit test for the desired behaviour in livedebugvalues_recover_clobbers.mir . Differential Revision: https://reviews.llvm.org/D120732
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 1c0e5ac..74f6e6e8 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -1634,11 +1634,6 @@ bool InstrRefBasedLDV::transferSpillOrRestoreInst(MachineInstr &MI) {
LocIdx SrcIdx = MTracker->getSpillMLoc(SpillID);
auto ReadValue = MTracker->readMLoc(SrcIdx);
MTracker->setReg(DestReg, ReadValue);
-
- if (TTracker) {
- LocIdx DstLoc = MTracker->getRegMLoc(DestReg);
- TTracker->transferMlocs(SrcIdx, DstLoc, MI.getIterator());
- }
};
for (MCSubRegIterator SRI(Reg, TRI, false); SRI.isValid(); ++SRI) {