[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 12:32:06 PDT 2023


jdoerfert added a comment.

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

> In D156816#4551409 <https://reviews.llvm.org/D156816#4551409>, @Anastasia wrote:
>
>> Why not to just use target address space and define it to some macro with desirable spelling?
>>
>> I don't think renaming OpenCL address space to something else makes sense. It might make more sense to just introduced different model of address spaces completely. But if you use OpenCL ones then it makes sense to have adequate naming so its documentation and etc can be located.
>
> My issue is that these address spaces aren't really OpenCL specific, they describe a larger concept than the OpenCL language itself and we'd like to use that without needing to invoke the `opencl` name, since it's unrelated in this context.



1. AS is not language or backend specific. We have mostly converged and we want to have some neutral spelling for the common ones.
2. This is not helping. Now the OpenCL attributes have a second spelling, but they are still OpenCL attributes (for the user due to the docs and for the developer in clang). We also are tied to OpenCL semantic of future versions.

> Why not to just use target address space and define it to some macro with desirable spelling?

Macros seems to be good enough. If we really need clang attributes, we need new docs, and naming convention etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156816



More information about the cfe-commits mailing list