[llvm] [NFC] Allow fragment expressions in extractIfOffset (PR #69006)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 06:59:33 PDT 2023


SLTozer wrote:

> FWIW, if someone wants to hoist DW_OP_LLVM_fragment into two optional fields in DIExpression, I'd support that too.

It would require a larger rewrite, but conceptually it'd make more sense to move fragment info into `DILocalVariable` (or create a subclass `DILocalVariableFragment`). `DW_OP_LLVM_fragment` is weird in that it's the only operator in a DIExpression that tells us about the variable whose value we are describing, rather than describing the value itself or how it should be interpreted (implicit/address/register). This _is_ part of Scott's rewrite, but I think it would be fine to implement in current LLVM - that patch is very large and could take some time to land, and furthermore introducing this change now would reduce the conceptual diff size for that patch.

https://github.com/llvm/llvm-project/pull/69006


More information about the llvm-commits mailing list