-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][Doc] Adjust design for compile-time properties through add_ir_annotations_member #5884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Doc] Adjust design for compile-time properties through add_ir_annotations_member #5884
Conversation
…annotations_member During implementation of the attribute and translation of annotations on fields, the design was conflicting with existing features. This commit makes the following design changes: * Change the `llvm.ptr.annotation` intrinsic call produced by `[[__sycl_detail__::add_ir_annotations_member()]]` to use a pointer to a constant global variable instead of metadata. This is done to adhere to the signature of the intrinsic. * Change the representation consumed by the translator from a new SPIR-V builtin to an extended version of existing decoration parsing using `llvm.ptr.annotation`. Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
The SPIR-V translator changes have been merged and the FE (#5879) has one approval. As such I think we can move this out of draft. |
* The third parameter is the name of the source file (as with any call to this | ||
intrinsic). | ||
* The fourth parameter is the line number (as with any call to this intrinsic). | ||
* The fifth parameter is a pointer to a constant global variable. The type of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it allowed adding parameters to the @llvm.ptr.annotation
intrinsic? In the LangRef only 4 parameters are described.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is curious. According to the intrinsic definition in Intrinsics.td it has 5 parameters, the last being another i8 *
. It does not seem to be a recent change so I think maybe someone forgot to update the LangRef?
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
During implementation of the attribute and translation of annotations on fields, the design was conflicting with existing features. This commit makes the following design changes:
llvm.ptr.annotation
intrinsic call produced by[[__sycl_detail__::add_ir_annotations_member()]]
to use a pointer to a constant global variable instead of metadata. This is done to adhere to the signature of the intrinsic.llvm.ptr.annotation
.Implementation of these are in review #5879 and KhronosGroup/SPIRV-LLVM-Translator#1446