[PATCH] D49572: [docs] Clarify role of DIExpressions within debug intrinsics

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 16:26:33 PDT 2018


vsk added inline comments.


================
Comment at: docs/LangRef.rst:4613
+
+- If the value operand of the intrinsic is an implicit location, the
+  DIExpression is interpreted as if it contained ``DW_OP_stack_value``,
----------------
rnk wrote:
> What makes value operands to dbg.value implicit or concrete in LLVM IR? Are SSA values from local instructions concrete, and constants implicit? We could describe that here.
Sure. The way I read it, it depends on the DIType of the described variable. The value operand is concrete iff it's is a pointer to an instance of that DIType. So, the value operand in dbg.value(const-ptr-null, "int *p") is implicit, but concrete in dbg.value(const-ptr-null, "int").

At least, that's the only consistent explanation I've thought of. I don't know how the backend actually determines this. IIUC D49454/D49520 is an example of the backend getting this wrong: it treats a pointer to a std::deque as the implicit location of the std::deque.


https://reviews.llvm.org/D49572





More information about the llvm-commits mailing list