[llvm] [NVPTX] Auto-Upgrade some nvvm.annotations to attributes (PR #119261)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 11:51:52 PST 2025
AlexMaclean wrote:
> Ok, I found a fix with the help of @d0k, it seems now we need to also set the calling convention of the function to llvm::CallingConv::PTX_Kernel, as the legacy annotations are not accepted anymore (the change to `isKernelFunction` in `NVPTXUtilities.h`)
Yep this seems like the appropriate solution to me. You should be able to also remove any code adding the `!"kernel"` metadata.
As a heads up, I hope to deprecate and remove nearly all `nvvm.annotations`, replacing them with attributes or other more idiomatic mechanisms. I'll update in-tree frontends and add auto-upgrade rules to ensure backwards compatibility with older IR, but any out-of-tree frontends where the IR doesn't go through Auto-upgrade will need to replace uses of `nvvm.annotations` as they are removed.
https://github.com/llvm/llvm-project/pull/119261
More information about the llvm-commits
mailing list