[PATCH] D68945: [DebugInfo] Don't translate dbg.addr and similar intrinsics into indirect DBG_VALUEs
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 03:19:54 PDT 2019
jmorse added a comment.
Hi Mikael,
In D68945#1710654 <https://reviews.llvm.org/D68945#1710654>, @uabelho wrote:
> And before this change we got the following after Isel:
>
> DBG_VALUE %fixed-stack.1, 0, !"bar_y", !DIExpression(DW_OP_LLVM_convert, 16, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value)
>
>
> With this change, we instead get this after Isel:
>
> DBG_VALUE %fixed-stack.1, $noreg, !"bar_y", !DIExpression(DW_OP_LLVM_convert, 16, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_deref, DW_OP_stack_value)
>
>
> Isn't the DW_OP_deref inserted in the wrong place? I think it should be done before the DW_OP_LLVM_convert:s rather than after?
You're right, that definitely looks wrong. This change was only supposed to affect DBG_VALUEs generated from indirect intrinsics (dbg.addr/dbg.declare); at a guess, it looks like dbg.values of Values that becomes FrameIndexes have the IsIndirect flag set too. I'll try to replicate this locally and patch it, please do back the commit out if it's causing significant misery.
(This is a great example of the kind of bug IsIndirect might be / have been causing, it doesn't express where the deref happens if there's an existing expression).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68945/new/
https://reviews.llvm.org/D68945
More information about the llvm-commits
mailing list