[llvm-commits] [pr12979][patch/rfc] Clear nsw/nuw in gvn

Dan Gohman gohman at apple.com
Mon Jun 4 13:56:54 PDT 2012


On Jun 1, 2012, at 10:50 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:

>>> Metadata nodes are uniqued. When merging two files of the same language, the
>>> type trees will merge as well, and they will then share the same root and
>>> potentially many sub-trees as well.
>> Okay
>> 
>>> So I believe the reasoning I presented is correct.
>> 
>> Oh, i don't disagree that least common ancestor is correct, it's what
>> we do in GCC.  I'm just pointing out the semantic you are suggesting
>> (loads in two different tbaa trees don't alias) is exactly the
>> opposite of what the semantic the language guide says :)
>> 
>> So if we want to go with that, we should update the language guide to
>> state that we don't consider things from two different tbaa trees to
>> alias.
> 
> Actually the documentation is correct regarding the implementation. (I just checked the TBAA code).
> Dan: is there any reason why pointers with different type roots are considered that they may alias?  It probably doesn't happen often anyway..

It's to support linking code from multiple front-ends
together. Each language has its own type system, and it isn't
possible in all cases to determine how a type in one language
relates to a type in another in TBAA terms.

Dan




More information about the llvm-commits mailing list