Skip to content

[SYCL] Diagnose attempt to pass pointer to VLA as kernel arg #2441

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

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

Fznamznon
Copy link
Contributor

@Fznamznon Fznamznon commented Sep 8, 2020

VLA as well as pointers to VLA require additional AST transformation to make
emission of corresponding type in LLVM IR possible. Without this transformation
Codegen just crashes.
Implementing this transformation is not reasonable whereas SYCL standard
doesn't allow VLA in device code, so emit an error in case if pointer to
VLA is passed as kernel argument.

@Fznamznon Fznamznon marked this pull request as draft September 8, 2020 18:13
VLA as well as pointers to VLA require additional AST transformation to make
emission of corresponding type in LLVM IR possible. Without this transformation
Codegen just crashes.
Implementing this transformation is not reasonable whereas SYCL standard
doesn't allow VLA in device code, so emit an error in case if pointer to
VLA is passed as kernel argument.
@Fznamznon Fznamznon changed the title [SYCL] Diagnose unsupported types in kernel arguments [SYCL] Diagnose attempt to pass pointer to VLA as kernel arg Sep 9, 2020
@Fznamznon Fznamznon marked this pull request as ready for review September 9, 2020 10:38
Copy link
Contributor

@elizabethandrews elizabethandrews 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 538c4c9 into intel:sycl Sep 9, 2020
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.

4 participants