[PATCH] D61181: [WIP][DebugInfo] Avoid SelectionDAG un-necessarily debug-referring to dead VRegs

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 14:58:23 PDT 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1261
 
+static void handleVRegDebugValue(const Value *V, DILocalVariable *Var,
+                                 DIExpression *Expr, DebugLoc dl,
----------------
Comment that explains what this function does?


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1272
+                   V->getType(), None);
+  if (RFV.occupiesMultipleRegs()) {
+    unsigned Offset = 0;
----------------
Perhaps:

```
if (!RFV.occupiesMultipleRegs()) {
   SDV = DAG.getVRegDbgValue(Var, Expr, Reg, Node, dl, Order);
   DAG.AddDbgValue(SDV, Node, false);
   return;
}
...
```


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1275
+    unsigned BitsToDescribe = 0;
+    if (auto VarSize = Var->getSizeInBits())
+      BitsToDescribe = *VarSize;
----------------
`unsigned BitsToDescribe = Var->getSizeInBits().getValueOr(0);`


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61181





More information about the llvm-commits mailing list