[llvm][CUDA] Allow NVVMREflect to process OpenCL-specific __nvvm_reflect_ocl()
authorHugh Delaney <hugh.delaney@codeplay.com>
Wed, 4 Jan 2023 19:52:08 +0000 (11:52 -0800)
committerArtem Belevich <tra@google.com>
Wed, 4 Jan 2023 20:03:00 +0000 (12:03 -0800)
commitce43e2f07477a166712b7ee4a89fbc65d2ed56ad
tree6bfe6d61a943f21e4ef0344fb4c5ba6b60320c55
parent56a40cd4abb17e984ae518a9ee838a8292de89d5
[llvm][CUDA] Allow NVVMREflect to process OpenCL-specific __nvvm_reflect_ocl()

OpenCL requires constant string arguments to be in a particular address space,
so OpenCL sources can't use the regular `__nvvm_reflect()`.

Allow NVVMReflect pass to accept an Open_CL specific variant with a constant
string in a non-default address space.

Differential Revision: https://reviews.llvm.org/D139213
llvm/lib/Target/NVPTX/NVVMReflect.cpp
llvm/test/CodeGen/NVPTX/nvvm-reflect-ocl.ll [new file with mode: 0644]