Skip to content

[SYCL] Preserve restrict on free function kernel pointer args#21989

Open
koparasy wants to merge 3 commits into
intel:syclfrom
koparasy:free-functions-restrict-ptr
Open

[SYCL] Preserve restrict on free function kernel pointer args#21989
koparasy wants to merge 3 commits into
intel:syclfrom
koparasy:free-functions-restrict-ptr

Conversation

@koparasy
Copy link
Copy Markdown
Contributor

Preserve top-level pointer qualifiers when rewriting SYCL free function kernel pointer parameters into global address space, so restrict lowers to LLVM noalias on generated kernel arguments. Add device-code coverage for restrict-qualified free function kernel and helper parameters.

I changed ModifyAddressSpace because that is where SYCL reconstructs rewritten pointer types. It was preserving pointee qualifiers but dropping top-level pointer qualifiers such as __restrict__, which caused the generated kernel parameters to lose LLVM noalias.

Preserve top-level pointer qualifiers when rewriting SYCL free function
kernel pointer parameters into global address space, so restrict lowers
to LLVM noalias on generated kernel arguments. Add device-code coverage
for restrict-qualified free function kernel and helper parameters.
@koparasy koparasy requested a review from bader May 11, 2026 23:08
@koparasy koparasy requested review from a team as code owners May 11, 2026 23:08
@koparasy koparasy requested a review from cperkinsintel May 11, 2026 23:08
Comment thread clang/test/CodeGenSYCL/free_function_kernels_restrict.cpp Outdated
@bader bader requested a review from Fznamznon May 12, 2026 15:30
Comment thread clang/test/CodeGenSYCL/free_function_kernels_restrict.cpp Outdated
Copy link
Copy Markdown
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.

thanks

@github-actions
Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

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