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

Addrspace #163

Closed
wants to merge 10 commits into from
Closed

Addrspace #163

wants to merge 10 commits into from

Conversation

yuri91
Copy link
Member

@yuri91 yuri91 commented Sep 29, 2023

First batch for the address space work.

This introduces an address space for pointers to client types, and uses it to detect those pointers in PA (with an assertion that the answer matches previous behavior).

Hopefully some of this prepares the way for further use of address spaces.

The first two commits are actually independent but related in scope (removal of some uses of pointer types)

This commit introduces the client_as address space in clang.
It is still not used anywhere, just declared.
In clang, all values of client type are implicitly put in the client_as
address space.
In llvm this translates to the address space 1 for pointers to
client types.

Nothing is actually done with this information yet.
In preparation for the switch to opaque pointers, get the information
from the pointer itself (through the address space) instead of the
element type.
These come up from temporaries of client types, since allocas are in the
default address space, while client types are forced to be in the client
address space. Clang here just blindly do a bitcast because the types
are different, but it needs to be specifically an address cast.
A proper solution would be to have the allocas themselves use the client
address space, but that's going to be a much bigger change to clang
@yuri91
Copy link
Member Author

yuri91 commented Dec 1, 2023

closing this since at this point the PR will include a more general approach

@yuri91 yuri91 closed this Dec 1, 2023
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.

1 participant