================
@@ -2525,6 +2525,13 @@ def AMDGPUNumVGPR : InheritableAttr {
   let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">;
 }
 
+def AMDGPUKernargPreloadCount : InheritableAttr {
+  let Spellings = [Clang<"amdgpu_kernarg_preload_count", 0>];
----------------
AaronBallman wrote:

These comments apply to other amdgpu attributes, so maybe worth addressing in a 
follow-up.

This means `__attribute__((amdgpu_kernarg_preload_count))` works in both C and 
C++, but `[[clang::amdgpu_kernarg_preload_count]]` only works in C++ and not C; 
is there a reason for that? (If the goal is to expose in C++ only, you can set 
the `LangOpts` for the attribute to do that. e.g., `let LangOpts = 
[CPlusPlus];`)

Also, should these be limited to just amdgpu targets or do these attributes do 
something outside of amd gpus? (I would have expected an "attribute ignored" 
diagnostic in cases where the attribute has no effect.)

https://github.com/llvm/llvm-project/pull/211059
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to