Commit Graph

2 Commits

Author SHA1 Message Date
Pekka Jaaskelainen 5136dd81ad Fix r286819 (accidentally patched multiple times.
llvm-svn: 286821
2016-11-14 13:14:38 +00:00
Pekka Jaaskelainen 2a1cc587bf [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD
It doesn't make sense to use the target's address space ids in this context as
this is metadata that should be referring to the "logical" OpenCL address spaces.
For flat AS machines like all "CPUs" in general, the logical AS info gets lost as
there's only one address space (0).

This commit changes the logic such that we always use the SPIR address space
ids for the argument metadata. It thus allows implementing the clGetKernelArgInfo()
and the other detection needs.

https://reviews.llvm.org/D26157

llvm-svn: 286819
2016-11-14 13:08:30 +00:00