[LLVMdev] Address space extension

Michele Scandale michele.scandale at gmail.com
Mon Aug 12 10:37:24 PDT 2013


> 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.  
> 
> 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 :)

For targets where there is only one physical address spaces the addrspace
modifier wont be used (as is now).
The idea is to emit TBAA-like additional info where the logical address space is
described (an identifier, properties and relationship respect to other address
spaces). These metadata should be attached to load/store & co. instructions like
TBAA metadata.

An additional alias analysis pass (chained with the others) would then use these
information to decide no-alias based on address space information:
(a) check address space metadata
(b) if (a) says "may alias" and target address spaces are available (because the
target support them) then the we query to the target to know if two target
address spaces are disjoint, if not says "may alias" to the rest of the chain.

Creating a new alias info metadata independent from the TBAA will require some
changes... so it may be useful to think something more general as change to do
the modification only once and no more in the future :-D.

Thanks,

-Michele






More information about the llvm-dev mailing list