[PATCH] D23283: Debugging of optimized code: When locals have their address taken as part of a call use their stack slots as location expressions for debug info.

Wolfgang Pieb via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 15:26:11 PDT 2016


wolfgangp added a comment.

Thanks for the review.


================
Comment at: include/llvm/IR/DebugInfoMetadata.h:2159
@@ +2158,3 @@
+
+  bool isDeref() const {
+    return getNumElements() > 0 && getElement(0) == dwarf::DW_OP_deref;
----------------
aprantl wrote:
> Please add a doxygen comment to the function.
> Should we rename this to startsWithDeref?
Sure, sounds better.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4758
@@ +4757,3 @@
+    int FI = FISDN->getIndex();
+    SDV = DAG.getFrameIndexDbgValue(Variable, EmptyDIExpr, FI, 0, dl,
+                                    DbgSDNodeOrder);
----------------
aprantl wrote:
> After relaxing the condition, you'll want the tail of the dwarf expression here, not just an empty expression.
Oh, yes, thanks for catching that.


https://reviews.llvm.org/D23283





More information about the llvm-commits mailing list