summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CachePruning.cpp
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2016-05-20 19:54:38 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2016-05-20 19:54:38 +0000
commitf7449a179b5398295ece62dbcc250686179a6dfd (patch)
tree804caa87f4c575884ee3d368ba1343824466b93f /llvm/lib/Support/CachePruning.cpp
parentccf5ee0b8f4c5ba88500a91ac2e4cdcf046299d5 (diff)
downloadbcm5719-llvm-f7449a179b5398295ece62dbcc250686179a6dfd.tar.gz
bcm5719-llvm-f7449a179b5398295ece62dbcc250686179a6dfd.zip
[OpenCL] Add to_{global|local|private} builtin functions.
OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e. global gentype *to_global(gentype *p); It is not desirable to declare it as global void *to_global(void *); in opencl header file since it misses diagnostics. This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument. In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library. Differential Revision: http://reviews.llvm.org/D19932 llvm-svn: 270261
Diffstat (limited to 'llvm/lib/Support/CachePruning.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud