[PATCH] D83495: [DebugInfo] Add DWARF emission for DBG_VALUE_LIST

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 09:12:54 PDT 2020


aprantl added a comment.

Could we reduce complexity by entirely replacing DBG_VALUE with DBG_VALUE_LIST, *, DW_OP_arg 0, *?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:904
+      OS << ", ";
+    if (Op.isFPImm()) {
+      APFloat APF = APFloat(Op.getFPImm()->getValueAPF());
----------------
Out of curiosity: Is there an operand kind that we could switch() over?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:435
+    case dwarf::DW_OP_LLVM_arg:
+      if (!InsertArg(Op->getArg(0), ExprCursor)) {
+        LocationKind = Unknown;
----------------
By using a callback here the callee cannot use the advanced functionality of addMachineRegExpression for any but a leading DW_OP_LLVM_arg. Do you see a way of either generalizing addMachineRegExpression or otherwise reorganizing this so the addMachineRegExpression functionality becomes available to DBG_VALUE_LIST?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83495/new/

https://reviews.llvm.org/D83495





More information about the llvm-commits mailing list