[PATCH] [DebugInfo][FastISel] Prevent using debug location from previous block for local values

David Blaikie dblaikie at gmail.com
Tue Jun 9 10:10:33 PDT 2015


On Tue, Jun 9, 2015 at 1:12 AM, Sergey Dmitrouk <sdmitrouk at accesssoftek.com>
wrote:

> On Mon, Jun 08, 2015 at 03:00:42PM -0700, David Blaikie wrote:
> > Might be worth pinging the original thread to provide the full context or
> > continue the discussion there (the mailing list archives are bad at
> > navigating the full context since they chunk it up into monthly pages -
> so
> > I can't see any replies to that patch review email, for example).
>
> The thread is not really helpful (here is its last message:
>
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121001/152251.html
> ).
> Comments in the PR describe what happened better:
> https://llvm.org/bugs/show_bug.cgi?id=14501
>
> > It's a bit problematic to continue to add workarounds on top of
> > workarounds - makes the code harder to maintain, etc. So there's
> something
> > to be said for considering what the "right" approach, if any, might be
> and
> > how much it would cost before we do this.
>
> The response by Frédéric on this thread seems to be the most detailed
> source of possible solutions:
>
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150518/277613.html


+Alexey, who's been hitting possibly related issues in code coverage tools
(specifically what can happen due to this fallthrough is that an inlined
debug location can appear non-inlined because the high/low/range of the
inlined subroutine may end at the end of the prior basic block, but the
locations leak into the proceeding basic block)

Alexey's theory is that it's always going to be possible that we have
un-assigned locations (& the zero location is probably insufficient - GCC
basically ignores it & treats it as a fallthrough location anyway and code
coverage tools wouldn't create a terribly good story with it either, most
likely). So if that's an unavoidable reality, then backpropagating
locations is necessary no matter how much we improve the debug location
accuracy/propagation on instruction creation.

I wonder if we end up with entirely un-located basic blocks (in which case
it might be harder to find a location to propagate... )...

- David


>
>
> --
> Sergey
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150609/e5a66e67/attachment.html>


More information about the llvm-commits mailing list