-
Notifications
You must be signed in to change notification settings - Fork 179
[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
bcardosolopes
left a comment
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!
bcardosolopes
left a comment
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
6e83ac5 to
7e9639a
Compare
bcardosolopes
left a comment
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.
Few minor nits remaining
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions cpp,c,h -- clang/test/CIR/CodeGen/scoped-atomic-load-store.c clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h clang/include/clang/CIR/MissingFeatures.h clang/lib/CIR/CodeGen/CIRGenAtomic.cpp clang/lib/CIR/CodeGen/CIRGenBuilder.h clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp clang/lib/CIR/Dialect/IR/CIRDialect.cpp clang/lib/CIR/Dialect/Transforms/TargetLowering/ItaniumCXXABI.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp clang/lib/CIR/Lowering/ThroughMLIR/LowerCIRLoopToSCF.cpp clang/test/CIR/CodeGen/AArch64/neon-ldst.cView the diff from clang-format here.diff --git a/clang/lib/CIR/Dialect/IR/CIRDialect.cpp b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
index 3a101a1fdc..16e1c052ca 100644
--- a/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+++ b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
@@ -1024,9 +1024,7 @@ void cir::LoadOp::setAtomic(cir::MemOrder order, cir::SyncScopeKind scope) {
// TODO(CIR): The final interface here should include an argument for the
// SyncScope::ID.
-void cir::StoreOp::setAtomic(cir::MemOrder order) {
- setMemOrder(order);
-}
+void cir::StoreOp::setAtomic(cir::MemOrder order) { setMemOrder(order); }
//===----------------------------------------------------------------------===//
// VecCreateOp
|
|
Seems like there's also some bad formatting needing fixes |
Fix #1868