[llvm] [NVPTX] Add NVVMUpgradeAnnotations pass to cleanup legacy annotations (PR #119261)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 12:41:27 PST 2024
================
@@ -311,11 +311,16 @@ std::optional<unsigned> getMaxNReg(const Function &F) {
}
bool isKernelFunction(const Function &F) {
+ if (F.getCallingConv() == CallingConv::PTX_Kernel)
+ return true;
+
+ if (F.hasFnAttribute("nvvm.kernel"))
+ return true;
+
if (const auto X = findOneNVVMAnnotation(&F, "kernel"))
return (*X == 1);
- // There is no NVVM metadata, check the calling convention
----------------
jhuber6 wrote:
Unsure, this code seems to be very old. If it breaks anything ideally the `libc` build bot would complain.
https://github.com/llvm/llvm-project/pull/119261
More information about the llvm-commits
mailing list