Go to file
Yaxun Liu f7449a179b [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
2016-05-20 19:54:38 +00:00
clang [OpenCL] Add to_{global|local|private} builtin functions. 2016-05-20 19:54:38 +00:00
clang-tools-extra [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
compiler-rt [esan] Add custom flag support 2016-05-20 19:26:52 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Use single precision fmax in sp path 2016-05-17 19:44:01 +00:00
libcxx Reorganize locale extension fallbacks. NFCI 2016-05-20 12:58:41 +00:00
libcxxabi libc++abi: make __cxa_call_unexpected visible 2016-05-11 23:56:37 +00:00
libunwind unwind: remove last instance of -Wexpansion-to-defined 2016-04-26 01:11:29 +00:00
lld Make tp offset computation target independent. 2016-05-20 17:41:09 +00:00
lldb Adopt mmap flags that allow mmap'ed memory to be less crash prone. 2016-05-20 19:18:20 +00:00
llgo [llgo] llgoi: separate evaluation from printing 2016-04-25 01:18:20 +00:00
llvm Use report_fatal_error after all 2016-05-20 19:46:42 +00:00
openmp Remove trailing whitespace in src/ directory 2016-05-20 19:03:38 +00:00
polly Revert "Optimistic assume required invariant loads to be invariant" 2016-05-19 13:47:34 +00:00