Skip to content

Conversation

@erichkeane
Copy link
Contributor

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.

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.
Copy link
Contributor

@smanna12 smanna12 left a 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.

Copy link
Contributor

@Fznamznon Fznamznon left a 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?

@Fznamznon Fznamznon requested a review from MrSidims June 17, 2020 06:47
Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bader bader merged commit 358ec04 into intel:sycl Jun 17, 2020
@AGindinson
Copy link
Contributor

AGindinson commented Jun 17, 2020

Nice one, thanks Erich!
Taking this further, is there a way to allow all operator[] implementers (like cl::sycl::accessor) into the attribute's arguments? Or am I missing something and it's already facilitated by the pointer-supporting code?

@erichkeane
Copy link
Contributor Author

Nice one, thanks Erich!
Taking this further, is there a way to allow all operator[] implementers (like cl::sycl::accessor) implementers into the attribute's arguments? Or am I missing something and it's already facilitated by the pointer-supporting code?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants