[PATCH] D83495: [DebugInfo] Add DWARF emission for DBG_VALUE_LIST

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 06:44:30 PST 2021


jmorse added a comment.

Just chiming in with Scott here:

> My fundamental argument is that this context-dependent interpretation of DW_OP_LLVM_arg is another source of confusion, just like isIndirect. I think this stems from the fact that DWARF as it is defined today is not general/composable enough to avoid this, but I don't think that should bleed into the internal representation used by LLVM: we can make a sensible choice up until we get into the DWARF backend, where certain expressions will have to be converted into a different form to be legal. Instead, what we have now is a situation where adding operations to the expression changes fundamentally how you are supposed to interpret the DW_OP_LLVM_arg. This is a pre-existing shortcoming, just like isIndirect, so saddling you with the burden of correcting it doesn't seem reasonable, but I think it is important to discuss. This is also important in the context of replacing DBG_VALUE entirely, as the assert will obviously need to go away.

I agree -- there's some existing misery here [0] where a pass has to be aware that modifying an expression might change the context it's interpreted in, which is an un-necessary complexity.

[0] https://github.com/llvm/llvm-project/blob/d06e94031bcdfa43512bf7b0cdfd4b4bad3ca4e1/llvm/lib/CodeGen/PrologEpilogInserter.cpp#L1238


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83495



More information about the llvm-commits mailing list