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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 13:28:25 PDT 2019


aprantl added a comment.

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

> In D68945#1708182 <https://reviews.llvm.org/D68945#1708182>, @aprantl wrote:
>
> > Thanks a lot! When changing something like this, you might want to diff the debug info of a test program before and after the change and look for any unexpected changes not covered by our tests.
>
>
> It looks like clang-3.4's X86ISelLowering.cpp produces identical debuginfo; I was expecting to see more PR41992 differences,
>
> > Yes, a DW_OP_deref is preferable to the indirect bit. How hard would it be to convert the remaining use-cases to retire the flag?
>
> Moderately complicated, there's currently a good use-case for IsIndirect, it lets the PrologEpilog pass distinguish:
>
> - DBG_VALUEs that refer to the contents of a spill stack slot (IsIndirect=True)
> - DBG_VALUEs that should evaluate to a stack pointer, not its value (IsIndirect=False) There are other ways of implementing this though, such as examining the stack-slot type or LiveDebugVariables prepending a DW_OP_deref for slot-contents locations.
>
>   I'd like to keep the field around, but use it to pass spill-slot frame indexes to LiveDebugValues, more on that in another patch though.


Sounds like the problem here is that we don't encode the difference between Memory locations and Register locations in DIExpression and/or DBG_VALUE. I think we currently decide the very late in DwarfExpression.cpp.


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