-
Notifications
You must be signed in to change notification settings - Fork 177
[CIR] Add syncscope support for atomic load operations #1958
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
5b25f33 to
af464b6
Compare
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.
Thanks for working on this. Almost good, some issues need addressing!
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.
LGTM
| UnitAttr:$is_nontemporal, | ||
| OptionalAttr<I64Attr>:$alignment, | ||
| OptionalAttr<CIR_MemOrder>:$mem_order, | ||
| OptionalAttr<CIR_AnyTBAAAttr>:$tbaa | ||
| OptionalAttr<I64Attr>:$alignment, | ||
| OptionalAttr<CIR_MemScopeKind>:$syncscope, | ||
| OptionalAttr<CIR_MemOrder>:$mem_order, | ||
| OptionalAttr<CIR_AnyTBAAAttr>:$tbaa | ||
| ); |
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.
fix the indent and remove break line
| OptionalAttr<CIR_MemOrder>:$mem_order, | ||
| OptionalAttr<CIR_AnyTBAAAttr>:$tbaa | ||
| OptionalAttr<I64Attr>:$alignment, | ||
| OptionalAttr<CIR_MemScopeKind>:$syncscope, |
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.
Also rename to sync_scope to have more standard name and mirror what clang and llvm does.
| def CIR_MemScopeKind : CIR_I32EnumAttr<"MemScopeKind", "memory scope kind", [ | ||
| I32EnumAttrCase<"SingleThread", 0, "single_thread">, | ||
| I32EnumAttrCase<"System", 1, "system"> | ||
| ]>; |
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.
Why not call it CIR_SyncScopeKind to be same as clang and llvm?
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.
We use sync_scope anyway in ops then.
Fix #1868