yxsamliu wrote:

> I still think we should not need this. DefaultIsPrivate is junk that needs to 
> be deleted. Querying for LangAS::Default should always give the answer 0 for 
> AMDGPU, which is what this is working around.
> 
> This clang notion of address space has nothing to do with your troubles with 
> llvm.used in the IR or SPIRV

LangAS::Default is not just determined by target. It also depends on language. 
For OpenCL 1.2 it is private. For example, the argument of `void foo(int*)` by 
language spec points to private addr space, and it translates to addr space 5 
instead of 0 in IR. (https://godbolt.org/z/E71E3Wb5e). Due to this, it is hard 
to let LangAS::Default maps to 0 for amdgpu target for all languages.

https://github.com/llvm/llvm-project/pull/95728
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to