[clang] [llvm] [clang] Simplify device kernel attributes (PR #137882)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 05:36:50 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];
+ let AdditionalMembers =
----------------
AaronBallman wrote:
I would still prefer using `Accessors` as the whole point to the feature is to do this based on spellings rather than doing it manually based on spelling list index.
https://github.com/llvm/llvm-project/pull/137882
More information about the llvm-commits
mailing list