Skip to content
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

[libclc] Explicitly qualify private address spaces #127823

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

frasercrmck
Copy link
Contributor

Doing so provides stability when compiling the builtins in a mode in which unqualified pointers may be interpreted as being in the generic address space, such as in OpenCL 3.0.

We eventually want to provide 'generic' overloads of the builtins in libclc so this prepares the ground a little better.

It could be argued that having the internal CLC helper functions be unqualified is more flexible, in case it's better for a target to have the pointers in the generic address space. This commits to the private address space for more stability across different OpenCL environments.

Doing so provides stability when compiling the builtins in a mode in
which unqualified pointers may be interpreted as being in the generic
address space, such as in OpenCL 3.0.

We eventually want to provide 'generic' overloads of the builtins in
libclc so this prepares the ground a little better.

It could be argued that having the internal CLC helper functions be
unqualified is more flexible, in case it's better for a target to have
the pointers in the generic address space. This commits to the private
address space for more stability across different OpenCL environments.
@frasercrmck frasercrmck added the libclc libclc OpenCL library label Feb 19, 2025
@frasercrmck frasercrmck requested a review from arsenm February 19, 2025 15:57
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

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

This should probably compile in CL2.0 mode anyway

@frasercrmck frasercrmck merged commit 9743b99 into llvm:main Feb 19, 2025
10 checks passed
@frasercrmck frasercrmck deleted the libclc-private-addrspace branch February 19, 2025 16:26
@frasercrmck
Copy link
Contributor Author

This should probably compile in CL2.0 mode anyway

We've been compiling our fork of libclc in CL3.0 mode. We'll see how to best to allow whatever. It's not difficult to swap out the version, but supporting yet more build configurations doesn't excite me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libclc libclc OpenCL library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants