[PATCH] D43687: Improve merging of debug locations (fixes PR 36410)

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 07:42:01 PST 2018


uweigand added a comment.

In https://reviews.llvm.org/D43687#1031791, @dblaikie wrote:

> Yeah, I still need to look more closely at this - my hunch/feeling is that,
>  while/if this approach is necessary for dbg.value intrinsics, it'd still
>  produce wrong or at least suboptimal locations in general. :/ (& I'm not
>  even sure it's the best thing for the dbg.values either... not sure what
>  should be done about them - perhaps they shouldn't be merged, instead
>  duplicated & keep their respective locations)


OK.  Maybe it is indeed a better choice to *not* merge dbg.value intrinsics, but just move over both sets from both sides of the "if" unchanged.  In fact, if you have dbg.value intrinsics for *different* variables, they are currently just deleted -- moving them over should keep the (correct) information that *both* those variables now have the specfied value at the new location ...

I'll try and come up with a patch along those lines.  If this approach works, we can abandon the patch in this Phabricator, and are free to instead implement whatever way to merge locations that seems best, without being constrained by the dbg.value requirements.


Repository:
  rL LLVM

https://reviews.llvm.org/D43687





More information about the llvm-commits mailing list