|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
| #
8c3fa317 |
| 20-Jun-2022 |
Sven van Haastregt <[email protected]> |
[OpenCL][TableGen] Fix type extension guard emission
For certain cases (such as for the double subtype of AGenType), the OpenCLBuiltinFileEmitterBase would not emit the extension #if-guard. Fix that
[OpenCL][TableGen] Fix type extension guard emission
For certain cases (such as for the double subtype of AGenType), the OpenCLBuiltinFileEmitterBase would not emit the extension #if-guard. Fix that by looking at the extension of the actual type instead of the argument type (which could be a GenType that does not carry any extension information).
show more ...
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
73e1888e |
| 21-Mar-2022 |
Sven van Haastregt <[email protected]> |
[OpenCL] Guard write_only image3d_t with TypeExtension
Ensure that the TypeExtension of an `ImageType` is also taken into account when generating `OpenCLBuiltins.inc`.
This aligns the handling of t
[OpenCL] Guard write_only image3d_t with TypeExtension
Ensure that the TypeExtension of an `ImageType` is also taken into account when generating `OpenCLBuiltins.inc`.
This aligns the handling of the `write_only image3d_t` type for `-fdeclare-opencl-builtins` with opencl-c.h with respect to the `cl_khr_3d_image_writes` extension.
Since the `write_only image3d_t` type is not available when the extension is disabled, this commit does not add a test to `SemaOpenCL/fdeclare-opencl-builtins.cl`.
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
28cdcf8e |
| 24-Feb-2022 |
Sven van Haastregt <[email protected]> |
[OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter
Until now, any types that had TypeExtensions attached to them were not guarded with those extensions. Extend the OpenCLBuiltinFileEmitter
[OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter
Until now, any types that had TypeExtensions attached to them were not guarded with those extensions. Extend the OpenCLBuiltinFileEmitter such that all required extensions are emitted for the types of a builtin function.
The `clang-tblgen -gen-clang-opencl-builtin-tests` emitter will now produce e.g.:
#if defined(cl_khr_fp16) && defined(cl_khr_fp64) half8 test11802_convert_half8_rtp(double8 arg1) { return convert_half8_rtp(arg1); } #endif // TypeExtension
Differential Revision: https://reviews.llvm.org/D120262
show more ...
|
| #
9798b33d |
| 17-Feb-2022 |
Sven van Haastregt <[email protected]> |
[OpenCL] Guard 64-bit atomic types
Until now, overloads with a 64-bit atomic type argument were always made available with `-fdeclare-opencl-builtins`. Ensure these overloads are only available whe
[OpenCL] Guard 64-bit atomic types
Until now, overloads with a 64-bit atomic type argument were always made available with `-fdeclare-opencl-builtins`. Ensure these overloads are only available when both the `cl_khr_int64_base_atomics` and `cl_khr_int64_extended_atomics` extensions have been enabled, as required by the OpenCL specification.
Differential Revision: https://reviews.llvm.org/D119858
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
16ceb44e |
| 25-Oct-2021 |
Kazu Hirata <[email protected]> |
[clang] Use llvm::{count,count_if,find_if,all_of,none_of} (NFC)
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
19bd806a |
| 09-Aug-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Add missing virtual destructor
Followup after f9ffe61fb53f ("[OpenCL] Factor out OpenCLBuiltinFileEmitterBase; NFC", 2021-08-09) introduced a -Wnon-virtual-dtor warning.
|
| #
f9ffe61f |
| 09-Aug-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Factor out OpenCLBuiltinFileEmitterBase; NFC
Factor out functionality that can be shared with a header file emitter that is to be added in the future.
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
ca964b40 |
| 11-Jun-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments
Since 8866793b4e0a ("[OpenCL] Add OpenCL builtin test generator", 2021-06-09) there are two emitters in this file, so move the file-level
[OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments
Since 8866793b4e0a ("[OpenCL] Add OpenCL builtin test generator", 2021-06-09) there are two emitters in this file, so move the file-level comment to the appropriate class.
show more ...
|
| #
8866793b |
| 09-Jun-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Add OpenCL builtin test generator
Add a new clang-tblgen flag `-gen-clang-opencl-builtin-tests` that generates a .cl file containing calls to every builtin function defined in the .td input
[OpenCL] Add OpenCL builtin test generator
Add a new clang-tblgen flag `-gen-clang-opencl-builtin-tests` that generates a .cl file containing calls to every builtin function defined in the .td input.
This patch does not add any use of the new flag yet, so the only way to obtain a generated test file is through a manual invocation of clang-tblgen. A test making use of this emitter will be added in a followup commit.
Differential Revision: https://reviews.llvm.org/D97869
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
37bc1dc9 |
| 27-Apr-2021 |
Sven van Haastregt <[email protected]> |
[NFC] Workaround MSVC2019 32-bit compiler crash
As reported on D100492, this restructuring should stop the internal compiler error from happening.
Fixes PR50128.
|
| #
e2b3b89b |
| 21-Apr-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Do not add builtins with unavailable types
Add functionality to assign extensions to types in OpenCLBuiltins.td and use that information to filter candidates that should not be exposed if a
[OpenCL] Do not add builtins with unavailable types
Add functionality to assign extensions to types in OpenCLBuiltins.td and use that information to filter candidates that should not be exposed if a type is not available.
Differential Revision: https://reviews.llvm.org/D100209
show more ...
|
| #
6cb7631d |
| 19-Apr-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Change OpenCL builtin version encoding
Instead of using a MinVersion and MaxVersion field, encode the version of a builtin using a mask that aligns better with version handling in OpenCLOpt
[OpenCL] Change OpenCL builtin version encoding
Instead of using a MinVersion and MaxVersion field, encode the version of a builtin using a mask that aligns better with version handling in OpenCLOptions.h. In addition, this saves a field in the BuiltinTable.
This change allows a finer-grained control over the OpenCL versions in which a builtin is available: instead of a range, we can now toggle each version individually.
The fine-grained version control is not yet exposed on the TableGen definitions side, as changes for OpenCL 3 feature optionality still need to be defined and will affect how we want to expose these.
Differential Revision: https://reviews.llvm.org/D100492
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3 |
|
| #
3fa0e793 |
| 02-Mar-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Use StringMap instead of std::map
As the LLVM Programmer's Manual suggests, use a StringMap instead of an std::map with a StringRef key.
|
|
Revision tags: llvmorg-12.0.0-rc2 |
|
| #
23d65aa4 |
| 17-Feb-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Support enum and typedef args in TableGen BIFs
Add enum and typedef argument support to `-fdeclare-opencl-builtins`, which was the last major missing feature.
Adding the remaining missing
[OpenCL] Support enum and typedef args in TableGen BIFs
Add enum and typedef argument support to `-fdeclare-opencl-builtins`, which was the last major missing feature.
Adding the remaining missing builtins is left as future work.
Differential Revision: https://reviews.llvm.org/D96051
show more ...
|
| #
a016374d |
| 08-Feb-2021 |
Sven van Haastregt <[email protected]> |
[OpenCL] Do not enforce ASTContext for OCL2Qual
Do not enforce that the expression to obtain the QualType for an OpenCL type starts with an ASTContext. This adds the required flexibility for handli
[OpenCL] Do not enforce ASTContext for OCL2Qual
Do not enforce that the expression to obtain the QualType for an OpenCL type starts with an ASTContext. This adds the required flexibility for handling the remaining missing argument types such as enums.
Differential Revision: https://reviews.llvm.org/D96050
show more ...
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
| #
4065e921 |
| 28-Mar-2020 |
Benjamin Kramer <[email protected]> |
Upgrade some instances of std::sort to llvm::sort. NFC.
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2 |
|
| #
0fff6593 |
| 06-Feb-2020 |
Sven van Haastregt <[email protected]> |
[OpenCL] Reduce size of builtin function tables
Reduce the size of some of the TableGen'ed OpenCL builtin function tables:
- Use bit fields for bools such that they are packed together. This s
[OpenCL] Reduce size of builtin function tables
Reduce the size of some of the TableGen'ed OpenCL builtin function tables:
- Use bit fields for bools such that they are packed together. This saves about 7kb.
- Use unsigned short for SignatureTable. This saves about 10kb.
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc1 |
|
| #
735f90fe |
| 29-Jan-2020 |
Benjamin Kramer <[email protected]> |
Fix one round of implicit conversions found by g++5.
|
|
Revision tags: llvmorg-11-init |
|
| #
e2b8e211 |
| 14-Jan-2020 |
Jinsong Ji <[email protected]> |
[clang][OpenCL] Fix covered switch warning
-Werror clang build is broken now.
tools/clang/lib/Sema/OpenCLBuiltins.inc:11824:5: error: default label in switch which covers all enumeration values [-W
[clang][OpenCL] Fix covered switch warning
-Werror clang build is broken now.
tools/clang/lib/Sema/OpenCLBuiltins.inc:11824:5: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default] default:
We don't need default now, since all enumeration values are covered.
Reviewed By: svenvh
Differential Revision: https://reviews.llvm.org/D72707
show more ...
|
| #
308b8b76 |
| 18-Dec-2019 |
Sven van Haastregt <[email protected]> |
[OpenCL] Add builtin function extension handling
Provide a mechanism to attach OpenCL extension information to builtin functions, so that their use can be restricted according to the extension(s) th
[OpenCL] Add builtin function extension handling
Provide a mechanism to attach OpenCL extension information to builtin functions, so that their use can be restricted according to the extension(s) the builtin is part of.
Patch by Pierre Gondois and Sven van Haastregt.
Differential Revision: https://reviews.llvm.org/D71476
show more ...
|
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
| #
0e56b0f9 |
| 05-Nov-2019 |
Sven van Haastregt <[email protected]> |
[OpenCL] Group builtin functions by prototype
The TableGen-generated file containing the function definitions can be reorganized to save some memory in the Clang binary. Functions having the same p
[OpenCL] Group builtin functions by prototype
The TableGen-generated file containing the function definitions can be reorganized to save some memory in the Clang binary. Functions having the same prototype(s) will point to a shared list of prototype(s).
Patch by Pierre Gondois and Sven van Haastregt.
Differential Revision: https://reviews.llvm.org/D63557
show more ...
|
| #
9a8d477a |
| 05-Nov-2019 |
Sven van Haastregt <[email protected]> |
[OpenCL] Add builtin function attribute handling
Add handling for the "pure", "const" and "convergent" function attributes for OpenCL builtin functions.
Patch by Pierre Gondois and Sven van Haastre
[OpenCL] Add builtin function attribute handling
Add handling for the "pure", "const" and "convergent" function attributes for OpenCL builtin functions.
Patch by Pierre Gondois and Sven van Haastregt.
Differential Revision: https://reviews.llvm.org/D64319
show more ...
|
| #
c45f8d49 |
| 01-Oct-2019 |
John McCall <[email protected]> |
Use scope qualifiers in Clang's tblgen backends to get useful redeclaration checking. NFC.
llvm-svn: 373406
|
| #
ed69faa0 |
| 19-Sep-2019 |
Sven van Haastregt <[email protected]> |
[OpenCL] Add version handling and add vector ld/st builtins
Allow setting a MinVersion, stating from which OpenCL version a builtin function is available, and a MaxVersion, stating from which OpenCL
[OpenCL] Add version handling and add vector ld/st builtins
Allow setting a MinVersion, stating from which OpenCL version a builtin function is available, and a MaxVersion, stating from which OpenCL version a builtin function should not be available anymore.
Guard some definitions of the "work-item" builtin functions according to the OpenCL versions from which they are available.
Add the "vector data load and store" builtin functions (e.g. vload/vstore), whose signatures differ before and after OpenCL 2.0 in the pointer argument address spaces.
Patch by Pierre Gondois and Sven van Haastregt.
Differential Revision: https://reviews.llvm.org/D63504
llvm-svn: 372321
show more ...
|
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
| #
988f1e3e |
| 05-Sep-2019 |
Sven van Haastregt <[email protected]> |
[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
[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
show more ...
|