summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL/to_addr_builtin.cl
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Pretty print __private addr spaceAnastasia Stulova2019-12-271-23/+23
| | | | | | | | | | Add printing of __private address space to TypePrinter to allow it appears in diagnostics and AST dumps as all other language addr spaces. Tags: #clang Differential Revision: https://reviews.llvm.org/D71272
* [OpenCL] Improve extension-version.cl and to_addr_builtin.cl testsSven van Haastregt2018-09-271-0/+76
| | | | | | | | | | | | | | Add cl_khr_depth_images to extension-version.cl. Extend to_addr_builtin.cl to additionally test the built-in methods to_private and to_local, and test assignment with to_global to incorrect types. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D52020 llvm-svn: 343207
* Revert "We allow implicit function declarations as an extension in all C ↵Anastasia Stulova2018-09-241-1/+1
| | | | | | | | | | dialects. Remove OpenCL special case." Discussed on cfe-commits (Week-of-Mon-20180820), this change leads to the generation of invalid IR for OpenCL without giving an error. Therefore, the conclusion was to revert. llvm-svn: 342885
* [OpenCL] Diagnose redundant address space conversionSven van Haastregt2018-09-201-1/+3
| | | | | | | | | | | | | | | | Add a warning if a parameter with a named address space is passed to a to_addr builtin. For example: int i; to_private(&i); // generate warning as conversion from private to private is redundant. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D51411 llvm-svn: 342638
* We allow implicit function declarations as an extension in all C dialects. ↵Richard Smith2017-10-041-1/+1
| | | | | | Remove OpenCL special case. llvm-svn: 314872
* [OpenCL] Added diagnostic for implicit declaration of function in OpenCLEgor Churaev2017-05-301-1/+1
| | | | | | | | | | | | Reviewers: Anastasia, cfe-commits Reviewed By: Anastasia Subscribers: bader, yaxunl Differential Revision: https://reviews.llvm.org/D31745 llvm-svn: 304193
* [OpenCL] Make OpenCL Builtins added according to the right version.Anastasia Stulova2016-07-041-7/+8
| | | | | | | | | | Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have to be added only in the version 2.0 compilation mode to make the identifiers available for use in the other versions. Review: http://reviews.llvm.org/D20249 llvm-svn: 274509
* [OpenCL] Add to_{global|local|private} builtin functions.Yaxun Liu2016-05-201-0/+54
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
OpenPOWER on IntegriCloud