[PATCH] D57157: [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 09:33:59 PST 2019
aprantl added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:112
+static Optional<unsigned> getAddressClass(const DIExpression &Expr) {
+ if (Expr.getNumElements() == 4 && Expr.getElement(0) == dwarf::DW_OP_constu &&
----------------
This should be a member function of DIExpression instead. We have other similar properties there already.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:113
+static Optional<unsigned> getAddressClass(const DIExpression &Expr) {
+ if (Expr.getNumElements() == 4 && Expr.getElement(0) == dwarf::DW_OP_constu &&
+ Expr.getElement(2) == dwarf::DW_OP_swap &&
----------------
This is not general enough. You probably want to check that the last 4 elements of the DIExpression match this pattern instead, since the LLVM optimizer may insert additional operations at the beginning of the Expression at any time.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57157/new/
https://reviews.llvm.org/D57157
More information about the llvm-commits
mailing list