Skip to content

libclc: clspv: do not set generic_addrspace_val #141912

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
Jun 2, 2025

Conversation

rjodinchr
Copy link
Contributor

This is breaking clspv: google/clspv#1493

@rjodinchr
Copy link
Contributor Author

@frasercrmck could you please review?

Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

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

Sorry about that.

Just to confirm this will work like nvptx, so it will report that the generic address space is available but won't generate certain generic functions (because it's identical to the private address space).

If we get round to adding proper support for generic atomic builtins you'd still get generic versions of those (with AS0) because there's no private address space to clash with. That's not happening right now but I thought I should make you aware.

@frasercrmck frasercrmck added the libclc libclc OpenCL library label May 29, 2025
@rjodinchr
Copy link
Contributor Author

While libclc is not generating the generic functions, they exist in clang. Thus clspv gets them from there, they are just not prefixed with __clc_. Later in clspv flow, we map them to the proper function using some inlining to figure out the exact addrspace.

Could you please merge this PR as I cannot do it myself? Thank you

@frasercrmck frasercrmck merged commit 8f3ccd1 into llvm:main Jun 2, 2025
11 checks passed
@rjodinchr rjodinchr deleted the pr/clspv-generic branch June 2, 2025 09:38
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
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