@@ -178,7 +178,7 @@ def ParallelOp : OpenMP_Op<"parallel", traits = [
178
178
179
179
let assemblyFormat = clausesAssemblyFormat # [{
180
180
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
181
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
181
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
182
182
$reduction_syms) attr-dict
183
183
}];
184
184
@@ -223,7 +223,7 @@ def TeamsOp : OpenMP_Op<"teams", traits = [
223
223
224
224
let assemblyFormat = clausesAssemblyFormat # [{
225
225
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
226
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
226
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
227
227
$reduction_syms) attr-dict
228
228
}];
229
229
@@ -282,7 +282,7 @@ def SectionsOp : OpenMP_Op<"sections", traits = [
282
282
283
283
let assemblyFormat = clausesAssemblyFormat # [{
284
284
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
285
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
285
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
286
286
$reduction_syms) attr-dict
287
287
}];
288
288
@@ -469,7 +469,7 @@ def LoopOp : OpenMP_Op<"loop", traits = [
469
469
470
470
let assemblyFormat = clausesAssemblyFormat # [{
471
471
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
472
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
472
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
473
473
$reduction_syms) attr-dict
474
474
}];
475
475
@@ -521,7 +521,7 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [
521
521
522
522
let assemblyFormat = clausesAssemblyFormat # [{
523
523
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
524
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
524
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
525
525
$reduction_syms) attr-dict
526
526
}];
527
527
@@ -575,7 +575,7 @@ def SimdOp : OpenMP_Op<"simd", traits = [
575
575
576
576
let assemblyFormat = clausesAssemblyFormat # [{
577
577
custom<PrivateReductionRegion>($region, $private_vars, type($private_vars),
578
- $private_syms, $reduction_vars, type($reduction_vars), $reduction_byref,
578
+ $private_syms, $reduction_mod, $ reduction_vars, type($reduction_vars), $reduction_byref,
579
579
$reduction_syms) attr-dict
580
580
}];
581
581
@@ -782,7 +782,7 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [
782
782
custom<InReductionPrivateReductionRegion>(
783
783
$region, $in_reduction_vars, type($in_reduction_vars),
784
784
$in_reduction_byref, $in_reduction_syms, $private_vars,
785
- type($private_vars), $private_syms, $reduction_vars,
785
+ type($private_vars), $private_syms, $reduction_mod, $ reduction_vars,
786
786
type($reduction_vars), $reduction_byref, $reduction_syms) attr-dict
787
787
}];
788
788
@@ -1706,6 +1706,26 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [
1706
1706
let hasVerifier = 1;
1707
1707
}
1708
1708
1709
+ def ScanOp : OpenMP_Op<"scan", [
1710
+ AttrSizedOperandSegments, MemoryEffects<[MemWrite]>
1711
+ ], clauses = [
1712
+ OpenMP_InclusiveClause, OpenMP_ExclusiveClause]> {
1713
+ let summary = "scan directive";
1714
+ let description = [{
1715
+ The scan directive allows to specify scan reductions. It should be
1716
+ enclosed within a parent directive along with which a reduction clause
1717
+ with `inscan` modifier must be specified. The scan directive allows to
1718
+ split code blocks into input phase and scan phase in the region
1719
+ enclosed by the parent.
1720
+ }] # clausesDescription;
1721
+
1722
+ let builders = [
1723
+ OpBuilder<(ins CArg<"const ScanOperands &">:$clauses)>
1724
+ ];
1725
+
1726
+ let hasVerifier = 1;
1727
+ }
1728
+
1709
1729
//===----------------------------------------------------------------------===//
1710
1730
// 2.19.5.7 declare reduction Directive
1711
1731
//===----------------------------------------------------------------------===//
0 commit comments