[all-commits] [llvm/llvm-project] 1a5908: [SYCL] The sycl_kernel_entry_point attribute. (#11...
Tom Honermann via All-commits
all-commits at lists.llvm.org
Tue Nov 5 08:09:56 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1a590870b6b3452934ecc245e01957fdab48909c
https://github.com/llvm/llvm-project/commit/1a590870b6b3452934ecc245e01957fdab48909c
Author: Tom Honermann <tom.honermann at intel.com>
Date: 2024-11-05 (Tue, 05 Nov 2024)
Changed paths:
M clang/include/clang/AST/ASTContext.h
A clang/include/clang/AST/SYCLKernelInfo.h
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Sema/SemaSYCL.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/lib/Sema/SemaSYCL.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
A clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp
M clang/test/Misc/pragma-attribute-supported-attributes-list.test
A clang/test/SemaSYCL/sycl-kernel-entry-point-attr-grammar.cpp
A clang/test/SemaSYCL/sycl-kernel-entry-point-attr-ignored.cpp
Log Message:
-----------
[SYCL] The sycl_kernel_entry_point attribute. (#111389)
The `sycl_kernel_entry_point` attribute is used to declare a function that
defines a pattern for an offload kernel to be emitted. The attribute requires
a single type argument that specifies the type used as a SYCL kernel name as
described in section 5.2, "Naming of kernels", of the SYCL 2020 specification.
Properties of the offload kernel are collected when a function declared with
the `sycl_kernel_entry_point` attribute is parsed or instantiated. These
properties, such as the kernel name type, are stored in the AST context where
they are (or will be) used for diagnostic purposes and to facilitate reflection
to a SYCL run-time library. These properties are not serialized with the AST
but are recreated upon deserialization.
The `sycl_kernel_entry_point` attribute is intended to replace the existing
`sycl_kernel` attribute which is intended to be deprecated in a future change
and removed following an appropriate deprecation period. The new attribute
differs in that it is enabled for both SYCL host and device compilation, may
be used with non-template functions, explicitly indicates the type used as
the kernel name type, and will impact AST generation.
This change adds the basic infrastructure for the new attribute. Future
changes will add diagnostics and new AST support that will be used to drive
generation of the corresponding offload kernel.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list