[Mlir-commits] [mlir] [mlir][OpenMP] inscan reduction modifier and scan op mlir support (PR #114737)
Sergio Afonso
llvmlistbot at llvm.org
Tue Jan 21 04:21:52 PST 2025
================
@@ -3125,6 +3153,41 @@ void MaskedOp::build(OpBuilder &builder, OperationState &state,
MaskedOp::build(builder, state, clauses.filteredThreadId);
}
+//===----------------------------------------------------------------------===//
+// Spec 5.2: Scan construct (5.6)
+//===----------------------------------------------------------------------===//
+
+void ScanOp::build(OpBuilder &builder, OperationState &state,
+ const ScanOperands &clauses) {
+ ScanOp::build(builder, state, clauses.inclusiveVars, clauses.exclusiveVars);
+}
+
+LogicalResult ScanOp::verify() {
+ if (hasExclusiveVars() && hasInclusiveVars()) {
----------------
skatrak wrote:
Nit: We should emit the error if both are present, but also if none of them are.
```suggestion
if (hasExclusiveVars() == hasInclusiveVars()) {
```
https://github.com/llvm/llvm-project/pull/114737
More information about the Mlir-commits
mailing list