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

Add support for typed pointers with the builtin PointerType. #73

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

tsymalla
Copy link
Contributor

@tsymalla tsymalla commented Nov 29, 2023

In some scenarios, we want to use typed pointers even if LLVM is moving to opaque pointers. Dialects currently only supports opaque pointers in its builtin. With this change, we simply return an i8* when evaluating a builtin pointer type return value or operand. This translates to an opaque pointer as well.
The client that creates the operations is responsible for handling the pointers correctly (e. g. not using opaque pointers in a
typed pointer scenario).

@tsymalla tsymalla force-pushed the typed_pointer_support branch 2 times, most recently from 355979a to eb5c5c4 Compare November 29, 2023 15:07
@tsymalla tsymalla force-pushed the typed_pointer_support branch from eb5c5c4 to f171e3b Compare December 1, 2023 18:57
Copy link
Member

@Flakebi Flakebi left a comment

Choose a reason for hiding this comment

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

LGTM apart from a nit inline

example/ExampleMain.cpp Outdated Show resolved Hide resolved
In some scenarios, we want to use typed pointers even if LLVM is moving
to opaque pointers. Dialects currently only supports opaque pointers in
its builtin. With this change, we simply return an i8* when evaluating a
builtin pointer type return value or operand. This translates to an opaque
pointer as well.
The client that creates the operations is responsible for
handling the pointers correctly (e. g. not using opaque pointers in a
typed pointer scenario).
@tsymalla tsymalla force-pushed the typed_pointer_support branch from f171e3b to ad22fb5 Compare December 2, 2023 06:18
Copy link
Member

@Flakebi Flakebi left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@tsymalla-AMD tsymalla-AMD merged commit a901f39 into GPUOpen-Drivers:dev Dec 4, 2023
8 checks passed
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