Skip to content

Conversation

@jiang1997
Copy link

Fix #1868

@jiang1997 jiang1997 force-pushed the fix-#1868 branch 2 times, most recently from 5b25f33 to af464b6 Compare October 26, 2025 19:20
Copy link
Member

@bcardosolopes bcardosolopes left a 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!

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 690 to 695
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
);
Copy link
Collaborator

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,
Copy link
Collaborator

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.

Comment on lines 540 to 543
def CIR_MemScopeKind : CIR_I32EnumAttr<"MemScopeKind", "memory scope kind", [
I32EnumAttrCase<"SingleThread", 0, "single_thread">,
I32EnumAttrCase<"System", 1, "system">
]>;
Copy link
Collaborator

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?

Copy link
Collaborator

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.

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.

cir.load does not have scoped atomic support

3 participants