[clang] [clang-sycl-linker] Generate SymbolTable for each image (PR #161287)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 07:48:33 PDT 2025
================
@@ -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
More information about the cfe-commits
mailing list