[libc-commits] [PATCH] D156731: [libc] Add basic wrappers for the backend address spaces
Matt Arsenault via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jul 31 13:49:04 PDT 2023
arsenm added inline comments.
================
Comment at: libc/src/__support/GPU/amdgpu/utils.h:25-28
+template <typename T> using Private = [[clang::address_space(5)]] T;
+template <typename T> using Constant = [[clang::address_space(4)]] T;
+template <typename T> using Shared = [[clang::address_space(3)]] T;
+template <typename T> using Global = [[clang::address_space(1)]] T;
----------------
jhuber6 wrote:
> arsenm wrote:
> > I don't really condone using the numbered address spaces to access these, they don't quite work the same way
> They directly map LLVM ones to the ones documented in the backend. Since this is regular C++ we don't have any other option.
Doesn't declaring as the opencl langAses work? I think those have attributes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156731/new/
https://reviews.llvm.org/D156731
More information about the libc-commits
mailing list