[clang] [clang] Use TargetInfo to determine device kernel calling convention (PR #144728)
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 18 11:52:38 PDT 2025
================
@@ -103,11 +103,11 @@ TargetCodeGenInfo::getDependentLibraryOption(llvm::StringRef Lib,
Opt += Lib;
}
-unsigned TargetCodeGenInfo::getOpenCLKernelCallingConv() const {
- // OpenCL kernels are called via an explicit runtime API with arguments
- // set with clSetKernelArg(), not as normal sub-functions.
+unsigned TargetCodeGenInfo::getDeviceKernelCallingConv() const {
+ // Device kernels are called via an explicit runtime API with arguments,
+ // such as set with clSetKernelArg() for OpenCL, not as normal sub-functions.
// Return SPIR_KERNEL by default as the kernel calling convention to
----------------
bader wrote:
👍. Now the logic almost identical to the current version of the code. We just shuffle the order of the `if`s.
https://github.com/llvm/llvm-project/pull/144728
More information about the cfe-commits
mailing list