- User Since
- Nov 8 2018, 5:39 AM (49 w, 3 d)
Jun 5 2019
Thanks for clarification and merging!
Jun 4 2019
Merging in two weeks is fine for me.
May 31 2019
Do you know when this will be merged?
Nov 13 2018
I agree with the change itself... but it's quite annoying that such things can't be tested. :(
CUDA maps __shared__ internally also to __attribute__((shared)):
#define __annotate__(a) \ __attribute__((a)) #define __location__(a) \ __annotate__(a) ... #define __shared__ \ __location__(shared)
My guess is that Clang does it just the same way and only converts to LangAS::cuda_shared for code generation in GetGlobalVarAddressSpace:
In contrast, OpenCL uses keywords that are mapped directly to LangAS::opencl_local etc.
Nov 12 2018
There are external tools (e.g. hipacc) that generate Clang AST. This AST uses LangAS annotations and emits incorrect memory space specifiers for CUDA when pretty-printed.
Nov 9 2018
Same problem here: The CUDA memory space specifiers are represented via attributes, e.g. CUDASharedAttr and only converted in CodeGen to LangAS::cuda_shared.
We would need a different frontend that annotates LangAS::cuda_shared.
Nov 8 2018
I think it's not so easy to provide such tests for CUDA.
CUDA memory space specifiers are implemented via attributes, e.g. #define __shared__ __attribute__((shared)).
As a result of this, they are pretty-printed via a different code path.
In my example, I call Ctx.getAddrSpaceQualType(QT, LangAS::cuda_shared), which is then pretty-printed via the code above.
Any hints how to provide tests for this one?