[clang] [llvm] [NVPTX] Auto-Upgrade some nvvm.annotations to attributes (PR #119261)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 13:48:49 PST 2024
================
@@ -1270,77 +1270,21 @@ exit:
; MODULE: attributes #[[ATTR1:[0-9]+]] = { convergent nocallback nounwind }
; MODULE: attributes #[[ATTR2:[0-9]+]] = { convergent nocallback nofree nounwind willreturn }
; MODULE: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
-; MODULE: attributes #[[ATTR4]] = { "kernel" }
-; MODULE: attributes #[[ATTR5]] = { nosync memory(none) }
+; MODULE: attributes #[[ATTR4]] = { "kernel" "nvvm.kernel" }
+; MODULE: attributes #[[ATTR5]] = { "kernel" }
+; MODULE: attributes #[[ATTR6]] = { nosync memory(none) }
;.
; CGSCC: attributes #[[ATTR0]] = { "llvm.assume"="ompx_aligned_barrier" }
; CGSCC: attributes #[[ATTR1:[0-9]+]] = { convergent nocallback nounwind }
; CGSCC: attributes #[[ATTR2:[0-9]+]] = { convergent nocallback nofree nounwind willreturn }
; CGSCC: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
-; CGSCC: attributes #[[ATTR4]] = { "kernel" }
-; CGSCC: attributes #[[ATTR5]] = { nosync memory(none) }
+; CGSCC: attributes #[[ATTR4]] = { "kernel" "nvvm.kernel" }
----------------
shiltian wrote:
>From my understanding, the reason we have `amdgpu_kernel` as a CC is, we also have other kinds of "kernels" that have different calling conventions, such as `amdgpu_cs`. @arsenm knows more about this.
If `nvvm.kernel` is the only kind you have, I'm not sure how much you would gain by making it a CC.
The current `kernel` should not be a CC because it is not. It has no calling convention related meaning. It is purely an identification used to identify kernel entry points for OpenMP target regions.
https://github.com/llvm/llvm-project/pull/119261
More information about the llvm-commits
mailing list