[llvm-dev] RFC: Resolving TBAA issues

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 20 07:49:33 PDT 2017


On Sun, Aug 20, 2017 at 2:47 AM, Ivan A. Kosarev via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello Daniel,
>
> >>>> the type of (*x) is not compatible with the type of (*b) or,
> >>>> recursively, type of b->i. Similarly, the type of (*b) is
> >>>> not compatible with (*x) or, recursively, x->i.
> >> ...
> >>> I think these are interesting interpretations.  I'm not sure
> >>> i'd personally agree with them (and there are definitely
> >>> compilers out there that do not).
> >>
> >> I wonder how you know that those compilers interpret it
> >> differently. If the correct answer for a specific case is
> >> "no alias", then reloading of values does not say anything
> >> about how authors interpret the cited clause.
> >>
> >> It's only omission of reloading that does matter.
> >
> > I know how to produce internal pass dump files and debug output
> > from a lot of compilers (XLC, ICC, GCC, etc)
> > So i'm staring at the debug output  to see what it says.
>
> Sorry, what I'm trying to determine here is whether observed facts
> contradict with either or both of the interpretations. I would appreciate
> if you can help me with this so once it is settled, we can proceed with
> resolving outstanding TBAA issues.
>

I really don't have the energy to keep going around on this.


>
> So once again, if for a specific case the correct answer is "no alias",
> then how you know by looking at the generated code, dump files and debug
> output what way the authors interpret the clause?
>

Because i can get the compilers to print, explicitly, what their
interpretation of tbaa is.


>
> You said that there are compilers that definitely do not agree with that
> 'a->i' and 'b->i' may not overlap if the types of (*a) and (*b) are not
> compatible.


This is actually not what i said at all.   Because we disagree as to
whether they are compatible.  You are asserting "compatibility" as if the
rules are easy and everyone must agree with your interpretation, but this
is not the case.  I'm not sure why you find that surprising, it's been the
case forever that people disagree on interpretations of these rules.



> Can we know how you came to this conclusion? Can you provide specific
> examples?
>
>
This conversation is becoming both frustrating, energy eating, and
honestly, not worth arguing about as there is simply no objective truth to
TBAA rules.  So i'm going to bow out.
Please feel free to do whatever you think is right, that users are happy
with, and that you document and test very well.

Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170820/c074d178/attachment.html>


More information about the llvm-dev mailing list