[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

Alexey Bader via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 22 11:11:28 PST 2025


================
@@ -362,3 +364,93 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
     }
   }
 }
+
+namespace {
+
+// The body of a function declared with the [[sycl_kernel_entry_point]]
+// attribute is cloned and transformed to substitute references to the original
+// function parameters with references to replacement variables that stand in
+// for SYCL kernel parameters or local variables that reconstitute a decomposed
+// SYCL kernel argument.
----------------
bader wrote:

I just want to confirm that we are not limited to adding new transforms (even ones that are not currently used in our downstream repository).
We may need new transforms to implement more efficient host <-> device SYCL kernel argument data transfer. We should be able to "compound" SYCL kernel arguments (i.e. the opposite of decomposing) if we find that more efficient. Right?

https://github.com/llvm/llvm-project/pull/122379


More information about the cfe-commits mailing list