[PATCH] D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 07:04:44 PDT 2019


avl added a comment.

In D64595#1613964 <https://reviews.llvm.org/D64595#1613964>, @jmorse wrote:

> NB, I haven't forgotten this (adding self as reviewer to keep track of it), but am out of office for a while. I think this hits a wider LLVM problem of values going in and out of memory (see discussion in [0] for example) and our ability to describe those circumstances.
>
> [0] https://bugs.llvm.org/show_bug.cgi?id=34136


It looks like  D37768 <https://reviews.llvm.org/D37768> was done to solve the problem of values going in and out of memory. 
i.e. dbg.addr should point to memory locations, dbg.value for register or constant values.
AFAIU your previous recommendation to avoid converting dbg.declare in instcombiner as well as similar recommendation done by  @rnk - they both based on the fact that dbg.addr solution is not fully implemented yet.  For SROA case it means : there should not be dbg.value pointing into an alloca. There should be dbg.addr pointing to alloca. Code which do dbg.declare lowering in instcombiner is just temporarily solution until dbg.addr is properly implemented.

Thus, for the current moment I think to implement your original suggestion with avoiding dbg.declare lowering in instcombiner for aggregates.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64595/new/

https://reviews.llvm.org/D64595





More information about the llvm-commits mailing list