[PATCH] D129909: [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 10:29:09 PDT 2022
jmorse added a comment.
This seems conceptually fine to me -- it's applying an existing pattern (of salvaging) in GISel where there's coverage loss. I don't feel confident enough to give a proper review though as I've never touched GISel. I would suggest though that you'll need some special handling for the DBG_VALUE "IsIndirect" flag (operand 1): when set to an integer rather than $noreg, it causes an implicit DW_OP_deref to be added at the end of compilation. If you convert the DIExpression to contain a DW_OP_stack_value, that doesn't work.
I feel obliged to point out that the "instruction referencing" re-design of variable locations on x86 [0] avoids problems like this by never referring to copies, so it never has to deal with problems like this. Implementing that for other architectures is work that I'm not able to do, alas.
[0] https://lists.llvm.org/pipermail/llvm-dev/2021-November/153653.html
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129909/new/
https://reviews.llvm.org/D129909
More information about the llvm-commits
mailing list