diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2022-04-25 14:06:12 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2022-04-25 14:06:12 +0100 |
commit | 13815e8cbf8d49b20f2c9d521a7cc6f5153ff9da (patch) | |
tree | cb2b2620d4c9ed43731ba6c7609b6919eac526d5 /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 36ba89b5b342bb450eec37d646e2ec11315fd315 (diff) | |
download | llvm-13815e8cbf8d49b20f2c9d521a7cc6f5153ff9da.zip llvm-13815e8cbf8d49b20f2c9d521a7cc6f5153ff9da.tar.gz llvm-13815e8cbf8d49b20f2c9d521a7cc6f5153ff9da.tar.bz2 |
Revert "[DebugInfo][InstrRef] Add a size operand to DBG_PHI"
This reverts commit fda4305e5378478051be225248bfe9c1d401d938.
Green dragon has spotted a problem -- it's understood, but might be fiddly
to fix, reverting in the meantime.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 21 |
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. |