diff options
| author | Vedant Kumar <vsk@apple.com> | 2019-11-19 11:58:14 -0800 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2019-11-19 12:03:52 -0800 |
| commit | ba71ca37208faf0916b4cae4298789796b791cfe (patch) | |
| tree | 0675663a7963fab9717de416a794db48bb9d1183 /llvm/lib/CodeGen | |
| parent | 3279724905c14a8db383ade53af40a0dd49504d8 (diff) | |
| download | bcm5719-llvm-ba71ca37208faf0916b4cae4298789796b791cfe.tar.gz bcm5719-llvm-ba71ca37208faf0916b4cae4298789796b791cfe.zip | |
[DebugInfo] Describe size of spilled values in call site params
A call site parameter description of a memory operand needs to
unambiguously convey the size of the operand to prevent incorrect entry
value evaluation.
Thanks for David Stenberg for pointing this issue out!
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index 2b987dabd24..d7a02eb61a2 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -1150,7 +1150,11 @@ TargetInstrInfo::describeLoadedValue(const MachineInstr &MI) const { if (!TII->getMemOperandWithOffset(MI, BaseOp, Offset, TRI)) return None; - Expr = DIExpression::prepend(Expr, DIExpression::DerefAfter, Offset); + SmallVector<uint64_t, 8> Ops; + DIExpression::appendOffset(Ops, Offset); + Ops.push_back(dwarf::DW_OP_deref_size); + Ops.push_back(MMO->getSize()); + Expr = DIExpression::prependOpcodes(Expr, Ops); return ParamLoadedValue(*BaseOp, Expr); } |

