- Jan 18, 2020
-
-
Matt Arsenault authored
Currently there are 4 different mechanisms for controlling denormal flushing behavior, and about as many equivalent frontend controls. - AMDGPU uses the fp32-denormals and fp64-f16-denormals subtarget features - NVPTX uses the nvptx-f32ftz attribute - ARM directly uses the denormal-fp-math attribute - Other targets indirectly use denormal-fp-math in one DAGCombine - cl-denorms-are-zero has a corresponding denorms-are-zero attribute AMDGPU wants a distinct control for f32 flushing from f16/f64, and as far as I can tell the same is true for NVPTX (based on the attribute name). Work on consolidating these into the denormal-fp-math attribute, and a new type specific denormal-fp-math-f32 variant. Only ARM seems to support the two different flush modes, so this is overkill for the other use cases. Ideally we would error on the unsupported positive-zero mode on other targets from somewhere. Move the logic for selecting the flush mode into the compiler driver, instead of handling it in cc1. denormal-fp-math/denormal-fp-math-f32 are now both cc1 flags, but denormal-fp-math-f32 is not yet exposed as a user flag. -cl-denorms-are-zero, -fcuda-flush-denormals-to-zero and -fno-cuda-flush-denormals-to-zero will be mapped to -fp-denormal-math-f32=ieee or preserve-sign rather than the old attributes. Stop emitting the denorms-are-zero attribute for the OpenCL flag. It has no in-tree users. The meaning would also be target dependent, such as the AMDGPU choice to treat this as only meaning allow flushing of f32 and not f16 or f64. The naming is also potentially confusing, since DAZ in other contexts refers to instructions implicitly treating input denormals as zero, not necessarily flushing output denormals to zero. This also does not attempt to change the behavior for the current attribute. The LangRef now states that the default is ieee behavior, but this is inaccurate for the current implementation. The clang handling is slightly hacky to avoid touching the existing denormal-fp-math uses. Fixing this will be left for a future patch. AMDGPU is still using the subtarget feature to control the denormal mode, but the new attribute are now emitted. A future change will switch this and remove the subtarget features.
-
- Jan 17, 2020
-
-
Matt Arsenault authored
-
- Dec 03, 2019
-
-
Sven van Haastregt authored
Commit 9a8d477a ("[OpenCL] Add builtin function attribute handling", 2019-11-05) stopped Clang from mangling single-overload builtins, which is incorrect.
-
- Nov 05, 2019
-
-
Sven van Haastregt authored
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
-
- Sep 05, 2019
-
-
Matt Arsenault authored
llvm-svn: 371010
-
- Aug 27, 2019
-
-
Matt Arsenault authored
The backend default maximum should be the hardware maximum, so the frontend should set the implementation defined default maximum. llvm-svn: 370101
-
- Aug 06, 2019
-
-
Matt Arsenault authored
The implementation of the OpenCL builtin currently library uses 2 different hacks to get to the corresponding IR intrinsics from the source. This will allow removal of those. This is the set that is currently used (minus a few vector ones). llvm-svn: 367973
-
- Aug 05, 2019
-
-
Anastasia Stulova authored
Avoid checking alignment unnecessary that is not portable among targets. llvm-svn: 367823
-
- Aug 03, 2019
-
-
Tim Northover authored
For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
-
- Aug 02, 2019
-
-
Anastasia Stulova authored
Allow creating vector literals from other vectors. float4 a = (float4)(1.0f, 2.0f, 3.0f, 4.0f); float4 v = (float4)(a.s23, a.s01); Differential revision: https://reviews.llvm.org/D65286 llvm-svn: 367675
-
- Jul 31, 2019
-
-
Matt Arsenault authored
llvm-svn: 367431
-
- Jul 25, 2019
-
-
Anastasia Stulova authored
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
-
- Jul 22, 2019
-
-
Christudasan Devadasan authored
Modified the intrinsics int_addressofreturnaddress, int_frameaddress & int_sponentry. This commit depends on the changes in rL366679 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D64563 llvm-svn: 366683
-
- Jul 17, 2019
-
-
Matt Arsenault authored
llvm-svn: 366286
-
- Jul 16, 2019
-
-
Neil Hickey authored
Allow conversions between integer and sampler type. Differential Revision: https://reviews.llvm.org/D64791 llvm-svn: 366212
-
- Jul 10, 2019
-
-
Vyacheslav Zakharin authored
Differential Revision: https://reviews.llvm.org/D63846 llvm-svn: 365666
-
Christudasan Devadasan authored
To enable a new implicit kernel argument, increased the number of argument bytes from 48 to 56. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D63756 llvm-svn: 365643
-
- Jul 09, 2019
-
-
Reid Kleckner authored
Certain OpenCL constructs cannot yet be mangled in the MS C++ ABI. Add a FIXME for it if anyone cares to implement it. llvm-svn: 365557
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D64430 llvm-svn: 365528
-
Marco Antognini authored
This patch ensures built-in functions are rewritten using the proper parent declaration. Existing tests are modified to run in C++ mode to ensure the functionality works also with C++ for OpenCL while not increasing the testing runtime. llvm-svn: 365499
-
- Jul 08, 2019
-
-
Brian Homerding authored
The revision at https://reviews.llvm.org/rL365336 added inference of the nofree attribute. This revision updates the test to reflect this. Differential Revision: https://reviews.llvm.org/D49165 llvm-svn: 365341
-
- Jun 25, 2019
-
-
Matt Arsenault authored
llvm-svn: 364251
-
- Jun 24, 2019
-
-
Leonard Chan authored
For CodeGenOpenCL/convergent.cl, the new PM produced a slightly different for loop, but this still checks for no loop unrolling as intended. This is committed separately from D63174. llvm-svn: 364202
-
- Jun 22, 2019
-
-
Matt Arsenault authored
This wasn't setting some of the features from older generations. llvm-svn: 364123
-
- Jun 20, 2019
-
-
Matt Arsenault authored
llvm-svn: 363986
-
- Jun 19, 2019
-
-
Matt Arsenault authored
llvm-svn: 363871
-
Simon Pilgrim authored
........ Depends on rL363678 which was reverted at rL363797 llvm-svn: 363824
-
- Jun 18, 2019
-
-
Matt Arsenault authored
llvm-svn: 363684
-
- Jun 14, 2019
-
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D63308 llvm-svn: 363345
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D63209 llvm-svn: 363341
-
- Jun 05, 2019
-
-
Tim Northover authored
LLVM IR recently added a Type parameter to the byval Attribute, so that when pointers become opaque and no longer have an element type the information will still be present in IR. For now the Type parameter is optional (which is why Clang didn't need this change at the time), but it will become mandatory soon. llvm-svn: 362652
-
- May 30, 2019
-
-
Tim Northover authored
Since byval is now a typed attribute it gets sorted slightly differently by LLVM when the order of attributes is being canonicalized. This updates the few Clang tests that depend on the old order. Clang patch is unchanged. llvm-svn: 362129
-
Anastasia Stulova authored
C++ is derived from OpenCL v2.0 therefore set the versions identically. Differential Revision: https://reviews.llvm.org/D62657 llvm-svn: 362102
-
Sven van Haastregt authored
Support logical operators on vectors in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Differential Revision: https://reviews.llvm.org/D62588 llvm-svn: 362087
-
- May 29, 2019
-
-
Tim Northover authored
The underlying LLVM change couldn't cope with llvm-link and broke LTO builds. llvm-svn: 362028
-
Tim Northover authored
Since byval is now a typed attribute it gets sorted slightly differently by LLVM when the order of attributes is being canonicalized. This updates the few Clang tests that depend on the old order. llvm-svn: 362013
-
- May 27, 2019
-
-
Yaxun Liu authored
OpenCL spec v2.0 s6.13.14: Samplers can also be declared as global constants in the program source using the following syntax. const sampler_t <sampler name> = <value> This works fine for OpenCL 1.2 but fails for 2.0, because clang duduces address space of file-scope const sampler variable to be in global address space whereas spec v2.0 s6.9.b forbids file-scope sampler variable to be in global address space. The fix is not to deduce address space for file-scope sampler variables. Differential Revision: https://reviews.llvm.org/D62197 llvm-svn: 361757
-
- May 24, 2019
-
-
Kevin Petit authored
The specification is available in the Khronos OpenCL registry: https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt Signed-off-by:
Kevin Petit <kevin.petit@arm.com> llvm-svn: 361641
-
- May 17, 2019
-
-
Sven van Haastregt authored
llvm-svn: 361004
-
- May 14, 2019
-
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D61875 llvm-svn: 360634
-