[PATCH] D68945: [DebugInfo] Don't translate dbg.addr and similar intrinsics into indirect DBG_VALUEs

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 04:06:55 PDT 2019


uabelho added a comment.

In D68945#1710698 <https://reviews.llvm.org/D68945#1710698>, @jmorse wrote:

> 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.


Thanks!

The C code originally looked like

  typedef signed short T;
  T bar(T d0, T d1, T d2, T d3, T d4, T x, T d5) {
    signed long bar_y = x;
    return bar_y;
  }

(where short is 16bits and long is 32bits on my target) and "x" was passed on the stack.


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