-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] IVDep: Add support for struct members and pointers #1908
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
Conversation
Struct members was missed in the initial implementation, we just need to properly handle the MemberExpr when doing our SEMA (+ consider it in a few other places). Pointers should be allowed, since the arrays decay to pointer pretty easily in the type system. The implementation is as simple as allowing it in Sema, then making sure we pass the Decl to the GEP creation function.
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.
Thanks Erich for the support.
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.
@MrSidims , could you please take a look?
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.
LGTM
Nice one, thanks Erich! |
There isn't really. If an attribute isn't something that modifies the type, the source code itself has no way to get to the attribute. What you CAN do is make the attribute and the code both get the argument the same way, such as a single constant expression that they both reference. |
Struct members was missed in the initial implementation, we just need to
properly handle the MemberExpr when doing our SEMA (+ consider it in a
few other places).
Pointers should be allowed, since the arrays decay to pointer pretty
easily in the type system. The implementation is as simple as allowing
it in Sema, then making sure we pass the Decl to the GEP creation
function.