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

2023-08-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4574190 , @arsenm wrote: > Probably should just wrap uses in macros for now In clang? Or just have users deal with `opencl_` on everything and rename it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2023-08-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. Probably should just wrap uses in macros for now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156816/new/

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

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > We also are tied to OpenCL semantic of future versions. This is what I would like to avoid aliasing to OpenCL and then starting to change it in a way that is not conforming or documented. Maybe there is a need for something like an address space for the group of

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551500 , @jdoerfert wrote: > Macros seems to be good enough. If we really need clang attributes, we need > new docs, and naming convention etc. Yeah an alternative would be a new set of attributes, then we make the

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

2023-08-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D156816#4551417 , @jhuber6 wrote: > In D156816#4551409 , @Anastasia > wrote: > >> Why not to just use target address space and define it to some macro with >> desirable spelling?

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In 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

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

2023-08-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156816#4551409 , @Anastasia wrote: > Why not to just use target address space and define it to some macro with > desirable spelling? If you mean the numbered address spaces, that's the broken thing this is specifically

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

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D156816#4551357 , @jhuber6 wrote: > In D156816#4551338 , @yaxunl wrote: > >>> FFI isn't the reason you'd use these, it's for generic access to the actual >>> backend. E.g. an

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551338 , @yaxunl wrote: >> 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

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

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156816#4551307 , @jhuber6 wrote: > In D156816#4551299 , @arsenm wrote: > >> I don't really see the point of doing this. These introduce ambiguous >> terminology. The reason you need

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In 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

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

2023-08-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. 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 Repository: rG LLVM Github Monorepo

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 546149. jhuber6 added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156816/new/ https://reviews.llvm.org/D156816 Files: clang/include/clang/Basic/Attr.td

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

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Are these attributes supposed to be used in other languages? Some of their names are meaningful only in OpenCL and could be confusing/ambiguous for other languages, e.g "global" and "local". Comment at: clang/include/clang/Basic/Attr.td:1348 +

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

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: ebevhan, arsenm, JonChesterfield, jdoerfert, tianshilei1992, tra, yaxunl, rjmccall. Herald added subscribers: jeroen.dobbelaere, Naghasan, ldrumm, arichardson, Anastasia. Herald added a reviewer: aaron.ballman. Herald added a project: All.