[PATCH] D88589: [DebugInfo] Handle dbg.values with multiple variable location operands in ISel

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 01:09:33 PST 2020


djtodoro added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:835
+  for (const SDNode *Node : V->getSDNodes())
+    if (Node)
+      DbgValMap[Node].push_back(V);
----------------
early continue?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8513
+  for (SDDbgValue *Dbg : ClonedDVs) {
+    assert(!Dbg->getSDNodes().empty());
+    AddDbgValue(Dbg, false);
----------------
Please add a message into the assertion.




================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8576
+  for (SDDbgValue *Dbg : ClonedDVs) {
+    assert(!Dbg->getSDNodes().empty());
+    AddDbgValue(Dbg, false);
----------------
Please add a message into the assertion.




================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1142
+    // which we should ideally fill with an extra Undef DBG_VALUE.
+    assert(DI->getNumVariableLocationOps() == 1);
+    DanglingDebugInfoMap[DI->getValue(0)].emplace_back(DI, DL, Order);
----------------
Please add a message into the assertion.




================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1291
+                                           bool IsVariadic) {
+  assert(!Values.empty());
+  SDDbgValue::LocOpVector LocationOps;
----------------
Please add a message into the assertion.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1383
+            continue;
+          assert(!IsVariadic);
+          SDDbgValue *SDV = DAG.getVRegDbgValue(
----------------
Please add a message into the assertion.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1389
         }
-      } else {
-        SDV = DAG.getVRegDbgValue(Var, Expr, Reg, false, dl, SDNodeOrder);
-        DAG.AddDbgValue(SDV, nullptr, false);
+        return true; // Early exit.
       }
----------------
Nit: These comments should go above.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5892
+    // Assume dbg.addr and dbg.declare can not currently use DIArgList, i.e.
+    // they are non-variadic.
     const auto &DI = cast<DbgVariableIntrinsic>(I);
----------------
Should we add an assertion here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88589



More information about the llvm-commits mailing list