[llvm] [libsycl] Remove libsycl declarations of spirv builtins (PR #227031)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 05:08:11 PDT 2026
KseniyaTikhomirova wrote:
> LGTM
>
> Are the SPIRV builtin helpers covered by issue #223203? Also I am just curious to understand this, but are the spirv builtin functions called only when the spirv backend is requested? and as such it would generate the appropriate spirv IR? Will this logic need to be changed (as a lot of classes seem to unconditionally call spirv functions) when new backends are supported or will they always be "translated" via SPIRV ?
builtins that I use in this PR are already properly implemented in clang. As you can see I don't declare them explicitly any more but they are still used in SYCL headers. So that issue is unrelated.
builtins functions are used in item/id/etc classes and is called from device code. compiler lower them to the proper instructions. AFAIK in intel/llvm for other backends we have a library that converts this "generic" call to appropriate backend specific calls, so far, design was going to be the same. This part is not unstreamed and is a subject for change if it will be feasible.
https://github.com/llvm/llvm-project/pull/227031
More information about the llvm-commits
mailing list