<div dir="ltr">On Mon, Aug 12, 2013 at 1:37 PM, Michele Scandale <span dir="ltr"><<a href="mailto:michele.scandale@gmail.com" target="_blank">michele.scandale@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> I don't think you need to change any of the existing MDNode's or AA passes.  TBAA adds metadata because that information isn't in the IR itself, but your IR has the address spaces.<br>

><br>
> Shouldn't the address space of the pointer and some additional information about the relationships between address spaces be enough?  Unless i've missed something.  This thread has gotten very large :)<br>
<br>
</div>For targets where there is only one physical address spaces the addrspace<br>
modifier wont be used (as is now).<br>
The idea is to emit TBAA-like additional info where the logical address space is<br>
described (an identifier, properties and relationship respect to other address<br>
spaces). These metadata should be attached to load/store & co. instructions like<br>
TBAA metadata.<br>
<br>
An additional alias analysis pass (chained with the others) would then use these<br>
information to decide no-alias based on address space information:<br>
(a) check address space metadata<br>
(b) if (a) says "may alias" and target address spaces are available (because the<br>
target support them) then the we query to the target to know if two target<br>
address spaces are disjoint, if not says "may alias" to the rest of the chain.<br>
<br>
Creating a new alias info metadata independent from the TBAA will require some<br>
changes... so it may be useful to think something more general as change to do<br>
the modification only once and no more in the future :-D.<br></blockquote><div><br></div><div>I agree.  It makes sense to try to design a way to attach arbitrary alias analysis MD nodes to the AliasAnalysis::Location struct.  I just worry about any performance implications of turning that into a SmallVector<> or such container.  Currently, its very cheap for TBAA to check if a TBAA metadata node exists.  If this becomes a search of a container of metadata nodes, then compiler performance may suffer.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
<br>
-Michele<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div>