[PATCH] D136173: [DebugInfo] Add function to test debug values for equivalence

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 00:39:48 PST 2022


StephenTozer added inline comments.


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1383-1385
+  // If Expr is indirect, insert the implied DW_OP_deref at the end of the
+  // expression but before DW_OP_{stack_value, LLVM_fragment} if they are
+  // present.
----------------
Orlando wrote:
> Have you seen (/got an example of) an indirect debug intrinsic using `stack_value` "naturally" in IR? I feel like that's something that shouldn't exist, but maybe I'm missing something / not being creative enough.
I do not, and it shouldn't happen as things currently are - this code is just following the general rules for correctly constructed DIExpressions (essentially copied functionality from `DIExpression::append`. I could remove the condition and add an assert instead though, since I think it's very distinctly not possible to have an indirect stack_value expression right now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136173



More information about the llvm-commits mailing list