================
@@ -466,6 +466,12 @@ static Error runAOTCompile(StringRef InputFile, StringRef 
OutputFile,
   return createStringError(inconvertibleErrorCode(), "Unsupported arch");
 }
 
+bool isKernel(const Function &F) {
+  const CallingConv::ID CC = F.getCallingConv();
+  return CC == CallingConv::SPIR_KERNEL || CC == CallingConv::AMDGPU_KERNEL ||
----------------
jhuber6 wrote:

The calling convention is supposed to be used over attributes because kernels 
are more correctly modeled as a calling convetion. For purposes of identifying 
globals of interest they should do the same thing I do to look up offload 
binaries in LTO files 
https://github.com/llvm/llvm-project/blob/82efd72ed505c6ec183eca700290a29051c2d6e6/llvm/lib/Object/OffloadBinary.cpp#L112

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

Reply via email to