Commit Graph

4 Commits

Author SHA1 Message Date
Kévin Petit
21508fa769 libclc: clspv: fix fma, add vstore and fix inlining issues
https://reviews.llvm.org/D147773

Patch by Romaric Jodin <rjodin@google.com>
2023-05-09 16:52:13 +01:00
Kévin Petit
f6cd46e07f libclc: add more generic implementations to clspv SOURCES
https://reviews.llvm.org/D134887

Patch by: Aaron Greig <aaron.greig@codeplay.com>
2023-02-14 18:11:01 +00:00
Kévin Petit
f11ab8353f libclc: remove sqrt/rsqrt from clspv SOURCES
https://reviews.llvm.org/D134040

Patch by: Aaron Greig <aaron.greig@codeplay.com>
2023-02-13 21:27:40 +00:00
Alan Baker
21427b8eb8 libclc: Add clspv target to libclc
Add clspv as a new target for libclc. clspv is an open-source compiler that compiles OpenCL C to Vulkan SPIR-V. Compiles for the spir target.

The clspv target differs from the the spirv target in the following ways:
* fma is modified to use uint2 instead of ulong for mantissas. This results in lower performance fma, but provides a implementation that can be used on more Vulkan devices where 64-bit integer support is less common.
* Use of a software implementation of nextafter because the generic implementation depends on nextafter being a defined builtin function for which clspv has no definition.
* Full optimization of the library (-O3) and no conversion to SPIR-V

This library is close to what would be produced by running opt -O3 < builtins.opt.spirv-mesa3d-.bc > builtins.opt.clspv--.bc and continuing the build from that point.

Reviewer: jvesely

Differential Revision: https://reviews.llvm.org/D94013
2021-03-04 00:19:10 -05:00