[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 3 10:10:09 PDT 2016
Anastasia added a comment.
In https://reviews.llvm.org/D26157#586764, @yaxunl wrote:
> One purpose of kernel arg info metadata is to be passed to OpenCL runtime to fulfill clGetKernelArgInfo queries. (https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetKernelArgInfo.html). As such, the address space id needs to be at source level instead of IR level.
Right, but what do you propose the numbers of source AS IDs to be or should we put CL_KERNEL_ARG_ADDRESS_GLOBAL, etc, as strings instead? I am not sure it's a good idea to tie SPIR and OpenCL together. At the end SPIR is meant to be an IR to compile from different source languages and not just OpenCL.
More information about the cfe-commits