[PATCH] D19522: Read discriminators correctly from object file.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 11:34:24 PDT 2016


On Tue, Apr 26, 2016 at 1:58 PM, Dehao Chen via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Unfortunately, we can't because I need to have two consecutive
> instructions that are both from discriminator 1, but different lines
> to trigger this bug. With your proposed change, the code sequence will
> be:
>
> line 4 discriminator 0
> line 4 discriminator 1
> line 5 discriminator 0
> line 5 discriminator 1
>
> But with my test case, the code sequence will be:
>
> line 4 discriminator 0
> line 5 discriminator 0
> line 4 discriminator 1
> line 5 discriminator 1
>

Ah, OK - thanks for the description (might be worth including that in the
test case, but I'm not sure - up to you)

Side note: Are we not including the column info when determining when to
add discriminators? Is there a reason for that (I vaguely recall asking
this before, so I assume we are intentionally disregarding column info for
some good reason I've forgotten). Because these locations are all unique
once you include column info (which we are including by default now).

- Dave


>
> On Tue, Apr 26, 2016 at 12:46 PM, David Blaikie <dblaikie at gmail.com>
> wrote:
> > dblaikie added inline comments.
> >
> > ================
> > Comment at: test/DebugInfo/X86/discriminator2.ll:9
> > @@ +8,3 @@
> > +; #3 void baz() {
> > +; #4   foo/*discriminator 1*/(bar(),
> > +; #5       bar());bar()/*discriminator 1*/;
> > ----------------
> > Would it be simpler/sufficient to do this:
> >
> >   void f1();
> >   void f2() {
> >     f1(); f1();
> >     f1(); f1();
> >   }
> >
> > (with column info off? Or, to keep column info on, #define CALLS f1();
> f1() and have the body of the function be:
> >   CALLS;
> >   CALLS;
> > )
> >
> >
> > http://reviews.llvm.org/D19522
> >
> >
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/63a68181/attachment-0001.html>


More information about the llvm-commits mailing list