Skip to content

[SYCL] Improve mutation of literal address space for variadic printf #5286

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 3 commits into from
Jan 13, 2022

Conversation

AGindinson
Copy link
Contributor

@AGindinson AGindinson commented Jan 11, 2022

The initial implementation of address space mutation assumed that in
presence of experimental::printf wrappers at the IR level, each
wrapper would use its dedicated signature of the __spirv_ocl_printf
builtin. However, this is not the case when the variadic signature of
the builtin is employed - in that scenario, the wrapper does not
become variadic, so __spirv_ocl_printf may have multiple wrapper
instances using it.

Adjust the algorithm for removing generic AS functions accordingly and
add LIT coverage for the non-inline variadic case.

In addition, minimize the IR for the non-variadic O0 test.

Signed-off-by: Artem Gindinson [email protected]

The initial implementation of address space mutation assumed that in
presence of `experimental::printf` wrappers at the IR level, each
wrapper would use its dedicated signature of the `__spirv_ocl_printf`
builtin. However, this is not the case when the variadic signature of
the builtin is employed - in that scenario, the wrapper does not
become variadic, so `__spirv_ocl_printf` may have multiple wrapper
instances using it.

Adjust the algorithm for removing generic AS functions accordingly and
add LIT coverage for the non-inline variadic case.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson requested a review from a team as a code owner January 11, 2022 18:50
@AGindinson
Copy link
Contributor Author

AGindinson commented Jan 11, 2022

There's clearly an issue with code-ownership rules - @intel/dpcpp-tools-reviewers should've been assigned instead. I'll rebase the PR once this is figured out within #5287.

@AGindinson AGindinson marked this pull request as draft January 11, 2022 18:53
Artem Gindinson added 2 commits January 12, 2022 13:04
Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson marked this pull request as ready for review January 12, 2022 15:32
@bader bader merged commit 8734a3d into intel:sycl Jan 13, 2022
@AGindinson AGindinson deleted the printf-noopt branch January 13, 2022 13:21
AGindinson pushed a commit to AGindinson/llvm that referenced this pull request Jan 13, 2022
This is a follow-up to intel#5286.

Signed-off-by: Artem Gindinson <[email protected]>
bader pushed a commit that referenced this pull request Jan 14, 2022
This is a follow-up to #5286.

In addition, reflect the default PM switch in the existing `RUN` lines.

Signed-off-by: Artem Gindinson <[email protected]>
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.

3 participants