[PATCH] D87233: [POC][DebugInfo] Use entry values within IR

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 02:01:46 PDT 2020


dstenb added a comment.

If I understand this correctly, the new `{EntryValue, EntryExpr}` operands do, if `EntryExpr` is not undef, specify a location that is identical to the dbg.value's current `{Value, Expr}` operands, but with DW_OP_LLVM_entry_value implicitly being applied to `EntryValue` before `EntryExpr`. Is that correct?

If so, just throwing out some questions (sorry in case I have overlooked the answers for this in the implementation):

- I assume that we are only interested in `EntryValue` operands that are `Argument` values? Should the verifier catch that? Or is there some case where it could anything else than an `Argument`?

- What should happen in cases where the dbg.values `Value` operand already is an `Argument`? Do we need to specify that value in the `EntryValue` operand also to ensure that entry values can be emitted?



================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1620-1623
+
+  Instruction *I = cast<Instruction>(V);
+  auto Op0 = I->getOperand(0);
+  auto Op1 = I->getOperand(1);
----------------
Nit: Can use `BI` here instead.


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

https://reviews.llvm.org/D87233



More information about the llvm-commits mailing list