arsenm added a comment.

I think the intent of the current code is for the address space to correspond 
to a "target address space" as if the user code used 
__attribute__((address_space(n))) to specify a pointer value. This is 
confusingly named, and different from the target address space selected for a 
LangAS. I think we need to add some mechanism for specifying the builtin is a 
LangAS ID. Since Ideally this would also work for multiple languages (e.g. 
cuda_constant or opencl_constant for the same builtin) I think there needs to 
be some callback triggered for the address space value. This possibly needs to 
be distinct from the current pointer descriptor to avoid breaking the 
possibility of user defined address spaces. There aren't really any other users 
of builtins with address spaces. NVPTX has some, but the tests seem to not 
actually try to use the declared address space and pass generic pointers to 
them.


Repository:
  rC Clang

https://reviews.llvm.org/D43281



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

Reply via email to