yaxunl added a comment.

In D156816#4551307 <https://reviews.llvm.org/D156816#4551307>, @jhuber6 wrote:

> In D156816#4551299 <https://reviews.llvm.org/D156816#4551299>, @arsenm wrote:
>
>> I don't really see the point of doing this. These introduce ambiguous 
>> terminology. The reason you need the attributes is basically for FFI to 
>> opencl code, so might as well make the specific meaning clearer with the 
>> opencl bit
>
> FFI isn't the reason you'd use these, it's for generic access to the actual 
> backend. E.g. an `addrspace(3)` global is local memory, if it's external it's 
> dynamic. Having these named is better than doing it via the numerical address 
> space. I'd like to use these in the C++ / OpenMP codes instead of the numeric 
> ones but I don't like needing to use `opencl` in the name. Similarly to how 
> we have the OpenCL atomics that should be usable outside of OpenCL.

I agree these attributes are useful in other languages, but "global" and 
"local" may need a more generic name suitable for all offloading languages. To 
me, "device" can be a good alternative to "global". even "shared" seems clearer 
than "local".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156816/new/

https://reviews.llvm.org/D156816

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to