[PATCH] D77589: libclc: Add Mesa/SPIR-V target

Daniel Stone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 06:37:19 PDT 2020


daniels marked 5 inline comments as done.
daniels added a comment.

In D77589#2073820 <https://reviews.llvm.org/D77589#2073820>, @jenatali wrote:

> It looks like we also need to add `_CLC_OVERLOAD` to the declaration and definitions of the functions declared in `workitem` as well as `barrer()`. The LLVM->SPIR-V converter requires these function names to be mangled in order to appropriately translate them to the dedicated SPIR-V built-ins. The names are not mangled for C/CLC unless overloading is requested.


I'll submit that as a separate change. I don't have a good way to test Clover at the moment, so I have to dig out the relevant Clover/llvmpipe branches and get them built.



================
Comment at: libclc/CMakeLists.txt:95
+	list( APPEND LIBCLC_TARGETS_ALL spirv-mesa3d-dxil )
+endif()
+
----------------
jvesely wrote:
> automagic build targets are not nice, because they can fail silently.
> I don't mind having dxil in ALL, but an error check if the user selected dxil and llvm-spirv tools were not found would be useful.
We already have the same for `amdgcn-mesa-mesa3d`, which won't be available unless LLVM >= 3.9 is used. So would you like me to always add the SPIR-V targets to all, then fail the build if the SPIR-V tools are not present but the user has selected (either through `all` or explicitly) to build the SPIR-V targets?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77589/new/

https://reviews.llvm.org/D77589





More information about the llvm-commits mailing list