@@ -170,7 +170,7 @@ def ParallelOp : OpenMP_Op<"parallel", traits = [
170170
171171 let assemblyFormat = clausesAssemblyFormat # [{
172172 custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
173- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
173+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
174174 $reduction_syms) attr-dict
175175 }];
176176
@@ -215,7 +215,7 @@ def TeamsOp : OpenMP_Op<"teams", traits = [
215215
216216 let assemblyFormat = clausesAssemblyFormat # [{
217217 custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
218- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
218+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
219219 $reduction_syms) attr-dict
220220 }];
221221
@@ -274,7 +274,7 @@ def SectionsOp : OpenMP_Op<"sections", traits = [
274274
275275 let assemblyFormat = clausesAssemblyFormat # [{
276276 custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
277- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
277+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
278278 $reduction_syms) attr-dict
279279 }];
280280
@@ -422,7 +422,7 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [
422422
423423 let assemblyFormat = clausesAssemblyFormat # [{
424424 custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
425- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
425+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
426426 $reduction_syms) attr-dict
427427 }];
428428
@@ -476,7 +476,7 @@ def SimdOp : OpenMP_Op<"simd", traits = [
476476
477477 let assemblyFormat = clausesAssemblyFormat # [{
478478 custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
479- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
479+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
480480 $reduction_syms) attr-dict
481481 }];
482482
@@ -680,7 +680,7 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [
680680 custom<InReductionPrivateReductionRegion>(
681681 $region, $in_reduction_vars, type($in_reduction_vars),
682682 $in_reduction_byref, $in_reduction_syms, $private_vars,
683- type($private_vars), $private_syms, $reduction_vars,
683+ type($private_vars), $private_syms, $reduction_mod, $ reduction_vars,
684684 type($reduction_vars), $reduction_byref, $reduction_syms) attr-dict
685685 }];
686686
@@ -1560,6 +1560,26 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [
15601560 let hasVerifier = 1;
15611561}
15621562
1563+ def ScanOp : OpenMP_Op<"scan", [
1564+ AttrSizedOperandSegments, RecipeInterface, IsolatedFromAbove
1565+ ], clauses = [
1566+ OpenMP_InclusiveClause, OpenMP_ExclusiveClause]> {
1567+ let summary = "scan directive";
1568+ let description = [{
1569+ The scan directive allows to specify scan reduction. Scan directive
1570+ should be enclosed with in a parent directive along with which , a
1571+ reduction clause with `InScan` modifier must be specified. Scan directive
1572+ allows to separate code blocks to input phase and scan phase in the region
1573+ enclosed by the parent.
1574+ }] # clausesDescription;
1575+
1576+ let builders = [
1577+ OpBuilder<(ins CArg<"const ScanOperands &">:$clauses)>
1578+ ];
1579+
1580+ let hasVerifier = 1;
1581+ }
1582+
15631583//===----------------------------------------------------------------------===//
15641584// 2.19.5.7 declare reduction Directive
15651585//===----------------------------------------------------------------------===//
0 commit comments