[clang] [llvm] [clang] Simplify device kernel attributes (PR #137882)
Nick Sarnie via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 11:19:20 PDT 2025
================
@@ -1538,11 +1533,32 @@ def CUDAShared : InheritableAttr {
}
def : MutualExclusions<[CUDAConstant, CUDAShared, HIPManaged]>;
-def SYCLKernel : InheritableAttr {
- let Spellings = [Clang<"sycl_kernel">];
- let Subjects = SubjectList<[FunctionTmpl]>;
- let LangOpts = [SYCLDevice];
+def DeviceKernel : DeclOrTypeAttr {
+ let Spellings = [Clang<"device_kernel">, Clang<"sycl_kernel">,
+ Clang<"nvptx_kernel">, Clang<"amdgpu_kernel">,
+ CustomKeyword<"__kernel">, CustomKeyword<"kernel">];
let Documentation = [SYCLKernelDocs];
----------------
sarnex wrote:
I made an attempt in the latest commit I just pushed [here](https://github.com/llvm/llvm-project/pull/137882/commits/421950d2e40012569993e911a635f86ce4bfd611). SYCL was the only documented one previously and I didn't want to be stucking having to document all the others, so hopefully the way I did it makes sense.
https://github.com/llvm/llvm-project/pull/137882
More information about the llvm-commits
mailing list