efriedma-quic wrote:

Both in InferAddressSpaces, and in Attributor, you don't really care about 
whether a flat address-space exists.  All you really need to know is whether, 
for a given pair of address-spaces "A" and "B", `addrspacecast ptr addrspace(A) 
%x to ptr addrspace(B)` should be optimized to use operations in "A" instead of 
"B".  In this context, the existence of a "flat" address-space is just a 
statement that we should optimize if "B" is the flat address-space.

Given that, maybe worth clarifying LangRef to be more explicit: start off with 
a statement of the "should be optimized" property, and then say that GPU 
targets commonly refer to this kind of address-space as "flat".

I don't know whether anyone needs the generalization to multiple flat 
address-spaces, or trees of address-spaces with multiple levels of nesting.

https://github.com/llvm/llvm-project/pull/108786
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to