================ @@ -187,12 +244,85 @@ void AtomicInfo::emitCopyIntoMemory(RValue rvalue) const { } } +static void emitAtomicOp(CIRGenFunction &cgf, AtomicExpr *expr, Address dest, + Address ptr, Address val1, uint64_t size, + cir::MemOrder order) { + std::unique_ptr<AtomicScopeModel> scopeModel = expr->getScopeModel(); + if (scopeModel) { + assert(!cir::MissingFeatures::atomicScope()); + cgf.cgm.errorNYI(expr->getSourceRange(), "emitAtomicOp: atomic scope"); + return; + } + + assert(!cir::MissingFeatures::atomicSyncScopeID()); + + CIRGenBuilderTy &builder = cgf.getBuilder(); + mlir::Location loc = cgf.getLoc(expr->getSourceRange()); + auto orderAttr = cir::MemOrderAttr::get(builder.getContext(), order); + + switch (expr->getOp()) { + default: ---------------- Lancern wrote:
Updated. https://github.com/llvm/llvm-project/pull/153814 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits