[PATCH] D45024: [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 15:39:42 PDT 2018


Rather than adding another list (if/when it comes to that) - we might want
to generalize the existing list to contain any/all local entities.

On Thu, Apr 5, 2018 at 3:38 PM Adrian Prantl via Phabricator <
reviews at reviews.llvm.org> wrote:

> aprantl added a comment.
>
> In https://reviews.llvm.org/D45024#1058953, @probinson wrote:
>
> > > My understanding was that in the latest revision of the design we
> don't have anywhere to attach the DILabel to when it is optimized away. If
> we do care about DILabels that have been optimized away (I don't see why we
> would want to) we would have to add a list of labels to the DISubprogram
> similar to how we keep dead variables around. But I don't htink that that
> is worth it.
> >
> > Hmm if I compile a function containing 3 labels and the debugger knows
> about only 2, I might think the compiler has a bug.
> >  We keep dead variables around so we can correctly report they have been
> optimized away.  Thinking ahead to supporting languages where labels are
> far more common than in C/C++ (for example I know the OpenVMS guys will
> want to support COBOL) I think a labels list might be appropriate.
>
>
> In the end I'm fine with both variants, but if we go for the line field in
> the DILabel I think we should also implement support for the labels list in
> DISubprogram or at least document our intention to add this clearly.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D45024
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180405/77882f60/attachment.html>


More information about the llvm-commits mailing list