================
@@ -1461,13 +1493,37 @@ mlir::LogicalResult
CIRToLLVMAtomicFetchOpLowering::matchAndRewrite(
}
mlir::LLVM::AtomicOrdering llvmOrder = getLLVMMemOrder(op.getMemOrder());
- llvm::StringRef llvmSyncScope = getLLVMSyncScope(op.getSyncScope());
+ llvm::StringRef llvmSyncScope = getLLVMSyncScope(op.getSyncScope(), op);
mlir::LLVM::AtomicBinOp llvmBinOp =
getLLVMAtomicBinOp(op.getBinop(), isInt, isSignedInt);
auto rmwVal = mlir::LLVM::AtomicRMWOp::create(
rewriter, op.getLoc(), llvmBinOp, adaptor.getPtr(), adaptor.getVal(),
llvmOrder, llvmSyncScope, /*alignment=*/0, op.getIsVolatile());
+ // CIRGen decides the metadata for a C++/HIP atomic from the atomic options
+ // in effect, so those markers are simply carried across.
+ for (llvm::StringRef marker :
+ {"cir.amdgpu_no_fine_grained_memory", "cir.amdgpu_no_remote_memory",
----------------
skc7 wrote:
CIRDialect.td already exposes sibling `getAMDGPU*AttrName()` accessors, could
we add these attrs there and reference those everywhere?
https://github.com/llvm/llvm-project/pull/225364
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits