aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2022-04-25 23:30:15 +0100
committerJeremy Morse <jeremy.morse@sony.com>2022-04-25 23:30:15 +0100
commit987cd7c3ed75b90de23ebf1845042646191f7bde (patch)
treef074c67c7abc4e489b1b6b7020df104d7019536e /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent8fbf9acc8c6704493fee70230e4aea6c4ddfde5a (diff)
downloadllvm-987cd7c3ed75b90de23ebf1845042646191f7bde.zip
llvm-987cd7c3ed75b90de23ebf1845042646191f7bde.tar.gz
llvm-987cd7c3ed75b90de23ebf1845042646191f7bde.tar.bz2
Revert "Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI"
This reverts commit 5db925023169f8a19419e68153682d1e518f8392. Further to the early revert, the sanitizers have found something wrong with this.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugVariables.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp
index 320e682..ce350b7 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.cpp
+++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp
@@ -1850,33 +1850,16 @@ void LDVImpl::emitDebugValues(VirtRegMap *VRM) {
const TargetRegisterClass *TRC = MRI.getRegClass(Reg);
unsigned SpillSize, SpillOffset;
- unsigned regSizeInBits = TRI->getRegSizeInBits(*TRC);
- if (SubReg)
- regSizeInBits = TRI->getSubRegIdxSize(SubReg);
-
- // Test whether this location is legal with the given subreg. If the
- // subregister has a nonzero offset, drop this location, it's too complex
- // to describe. (TODO: future work).
+ // Test whether this location is legal with the given subreg.
bool Success =
TII->getStackSlotRange(TRC, SubReg, SpillSize, SpillOffset, *MF);
- if (Success && SpillOffset == 0) {
+ if (Success) {
auto Builder = BuildMI(*OrigMBB, OrigMBB->begin(), DebugLoc(),
TII->get(TargetOpcode::DBG_PHI));
Builder.addFrameIndex(VRM->getStackSlot(Reg));
Builder.addImm(InstNum);
- // Record how large the original value is. The stack slot might be
- // merged and altered during optimisation, but we will want to know how
- // large the value is, at this DBG_PHI.
- Builder.addImm(regSizeInBits);
- }
-
- LLVM_DEBUG(
- if (SpillOffset != 0) {
- dbgs() << "DBG_PHI for Vreg " << Reg << " subreg " << SubReg <<
- " has nonzero offset\n";
}
- );
}
// If there was no mapping for a value ID, it's optimized out. Create no
// DBG_PHI, and any variables using this value will become optimized out.