[clang] [OpenACC][CIR] Implement 'atomic capture' lowering (PR #168422)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 18 11:10:00 PST 2025
================
@@ -314,15 +314,80 @@ const VarDecl *getLValueDecl(const Expr *e) {
return cast<VarDecl>(dre->getDecl());
}
-mlir::LogicalResult
-CIRGenFunction::emitOpenACCAtomicConstruct(const OpenACCAtomicConstruct &s) {
- // For now, we are only support 'read'/'write'/'update', so diagnose. We can
- // switch on the kind later once we implement the 'capture' form.
- if (s.getAtomicKind() == OpenACCAtomicKind::Capture) {
- cgm.errorNYI(s.getSourceRange(), "OpenACC Atomic Construct");
- return mlir::failure();
+static mlir::acc::AtomicReadOp
+emitAtomicRead(CIRGenFunction &cgf, CIRGenBuilderTy &builder,
+ mlir::Location start,
+ OpenACCAtomicConstruct::SingleStmtInfo inf) {
----------------
xlauko wrote:
```suggestion
const OpenACCAtomicConstruct::SingleStmtInfo &inf) {
```
?
https://github.com/llvm/llvm-project/pull/168422
More information about the cfe-commits
mailing list