-
Notifications
You must be signed in to change notification settings - Fork 247
Add memory semantics to atomic builtins #3375
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
base: main
Are you sure you want to change the base?
Conversation
The approach looks reasonable to me; it would be nice to have some comments on the various functions though (explaining for which cases we need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall approach LGTM, thanks!
| GenericAS = MaybeAS; | ||
| } | ||
|
|
||
| if (auto *Op = dyn_cast<Operator>(Current)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own understanding, is this kind of a "light" form of generic addresss space inference?
Is this primarily needed because explicit address space overloads don't exist, or because explicit address space overloads aren't being used, or something else?
To be clear, I think this is fine and a good idea to include, just trying to understand why it is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's light version of Infer Address Space pass. It's created because different front ends can pick different default address spaces for pointers. AFAIK even for upstream OpenCL there will be different LLVM IR produced by clang for SPIR and AMDGPU (through SPIR(V) tool chain(s) targets).
I'm actually missing one assumption. If worklist ends up on generic alloca - it should be assumed as private alloca.
It's deduced from a pointer's address space. Resolves: KhronosGroup#3371 Signed-off-by: Sidorov, Dmitry <[email protected]>
868d6bd to
a4215cb
Compare
Signed-off-by: Sidorov, Dmitry <[email protected]>
a4215cb to
fb1864a
Compare
It's deduced from a pointer's address space.
Resolves:
#3371