[PATCH] D69178: [DebugInfo] Use DBG_VALUEs IsIndirect field for describing stack spills
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 02:35:24 PST 2019
djtodoro added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues.cpp:240
uint64_t RegNo;
SpillLoc SpillLocation;
int64_t Immediate;
----------------
aprantl wrote:
> aprantl wrote:
> > It looks like this is exploding the size of the union. Could SpillLocation be made to fit into 64 bits, or does the extra 8 bytes not matter, or should it be an index into a side-table in the union?
> At some point we'll cross over the point were this should be inheritance instead of a union.
+1
I think we should think about refactoring the `VarLoc`, by creating several structures representing various locations. That should improve readability.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues.cpp:1546
+ unsigned PrependFlags = DIExpression::ApplyOffset;
+ DIExpr = DIExpression::prepend(DIExpr, PrependFlags, Offset);
+ MI.getOperand(3).setMetadata(DIExpr);
----------------
we do not need the `PrependFlags`, so:
`DIExpression::prepend(DIExpr, DIExpression::ApplyOffset, Offset);`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69178/new/
https://reviews.llvm.org/D69178
More information about the llvm-commits
mailing list