[OpenCL] Add image type handling for builtins
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Thu, 5 Sep 2019 10:01:24 +0000 (10:01 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Thu, 5 Sep 2019 10:01:24 +0000 (10:01 +0000)
commit988f1e3e32a95df46da4f98b5652b0dc8b444c7f
tree09ffc70a811a474dea273dced8d133ca7bcbad0d
parentaff45e4b235dd7f369c7054761ccb3853fafdfac
[OpenCL] Add image type handling for builtins

Image types were previously available, but not working.  This patch
adds image type handling.

Rename the image type definitions in the .td file to make them
consistent with other type names.  Use abstract types to represent the
unqualified types.  Instantiate access-qualified image types at the
point of use using, e.g. `ImageType<Image2d, "RO">`.

Add/update TableGen definitions for the read_image/write_image
builtin functions.

Patch by Pierre Gondois and Sven van Haastregt.

Differential Revision: https://reviews.llvm.org/D63480

llvm-svn: 371046
clang/lib/Sema/OpenCLBuiltins.td
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp