[OpenCL] Pipe builtin functions
authorXiuli Pan <xiulipan@outlook.com>
Tue, 26 Jan 2016 02:06:04 +0000 (02:06 +0000)
committerXiuli Pan <xiulipan@outlook.com>
Tue, 26 Jan 2016 02:06:04 +0000 (02:06 +0000)
commit3a9952c9e7d0633d13b55cefb76872afd6136097
tree112cddcae1aece8ff00c43a273dc7a5aaead8666
parent09a8a8a59d7d7d0f79b6eb8b172ca22b0ed30c73
[OpenCL] Pipe builtin functions

Summary:
Support for the pipe built-in functions for OpenCL 2.0.
The pipe builtin functions may have infinite kinds of element types, one approach
would be to just generate calls that would always use generic types such as void*.
This patch is based on bader's opencl support patch on SPIR-V branch.

Reviewers: Anastasia, pekka.jaaskelainen

Subscribers: keryell, bader, cfe-commits

Differential Revision: http://reviews.llvm.org/D15914

llvm-svn: 258773
clang/include/clang/Basic/Builtins.def
clang/include/clang/Basic/Builtins.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Basic/Builtins.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGenOpenCL/pipe_builtin.cl [new file with mode: 0644]
clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl [new file with mode: 0644]