[PATCH] D19932: [OpenCL] Add to_{global|local|private} builtin functions.
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu May 5 07:53:13 PDT 2016
yaxunl added a comment.
In http://reviews.llvm.org/D19932#421961, @pxli168 wrote:
> Could we output a generic function in CodeGen?
> This seems to have no big difference to have a lot of declaration in an opencl c header file.
What return type and argument type to use would you suggest for this generic function? If it is something like
i8 addrspace(1)* to_global(i8 addrspace(4)*)
then bitcasts will be needed, which is what we want to avoid.
These functions accept pointers to arbitrary user types, so they cannot be declared in a header file.
http://reviews.llvm.org/D19932
More information about the cfe-commits
mailing list