@@ -170,7 +170,7 @@ def ParallelOp : OpenMP_Op<"parallel", traits = [
170
170
171
171
let assemblyFormat = clausesAssemblyFormat # [{
172
172
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,
174
174
$reduction_syms) attr-dict
175
175
}];
176
176
@@ -215,7 +215,7 @@ def TeamsOp : OpenMP_Op<"teams", traits = [
215
215
216
216
let assemblyFormat = clausesAssemblyFormat # [{
217
217
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,
219
219
$reduction_syms) attr-dict
220
220
}];
221
221
@@ -274,7 +274,7 @@ def SectionsOp : OpenMP_Op<"sections", traits = [
274
274
275
275
let assemblyFormat = clausesAssemblyFormat # [{
276
276
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,
278
278
$reduction_syms) attr-dict
279
279
}];
280
280
@@ -422,7 +422,7 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [
422
422
423
423
let assemblyFormat = clausesAssemblyFormat # [{
424
424
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,
426
426
$reduction_syms) attr-dict
427
427
}];
428
428
@@ -476,7 +476,7 @@ def SimdOp : OpenMP_Op<"simd", traits = [
476
476
477
477
let assemblyFormat = clausesAssemblyFormat # [{
478
478
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,
480
480
$reduction_syms) attr-dict
481
481
}];
482
482
@@ -600,7 +600,7 @@ def TaskOp : OpenMP_Op<"task", traits = [
600
600
601
601
let assemblyFormat = clausesAssemblyFormat # [{
602
602
custom<InReductionPrivateRegion>(
603
- $region, $in_reduction_vars, type($in_reduction_vars),
603
+ $region, $in_reduction_mod, $ in_reduction_vars, type($in_reduction_vars),
604
604
$in_reduction_byref, $in_reduction_syms, $private_vars,
605
605
type($private_vars), $private_syms) attr-dict
606
606
}];
@@ -678,9 +678,9 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [
678
678
679
679
let assemblyFormat = clausesAssemblyFormat # [{
680
680
custom<InReductionPrivateReductionRegion>(
681
- $region, $in_reduction_vars, type($in_reduction_vars),
681
+ $region, $in_reduction_mod, $ in_reduction_vars, type($in_reduction_vars),
682
682
$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,
684
684
type($reduction_vars), $reduction_byref, $reduction_syms) attr-dict
685
685
}];
686
686
@@ -725,7 +725,7 @@ def TaskgroupOp : OpenMP_Op<"taskgroup", traits = [
725
725
726
726
let assemblyFormat = clausesAssemblyFormat # [{
727
727
custom<TaskReductionRegion>(
728
- $region, $task_reduction_vars, type($task_reduction_vars),
728
+ $region, $task_reduction_mod, $ task_reduction_vars, type($task_reduction_vars),
729
729
$task_reduction_byref, $task_reduction_syms) attr-dict
730
730
}];
731
731
@@ -1146,7 +1146,7 @@ def TargetOp : OpenMP_Op<"target", traits = [
1146
1146
1147
1147
let assemblyFormat = clausesAssemblyFormat # [{
1148
1148
custom<InReductionMapPrivateRegion>(
1149
- $region, $in_reduction_vars, type($in_reduction_vars),
1149
+ $region, $in_reduction_mod, $ in_reduction_vars, type($in_reduction_vars),
1150
1150
$in_reduction_byref, $in_reduction_syms, $map_vars, type($map_vars),
1151
1151
$private_vars, type($private_vars), $private_syms) attr-dict
1152
1152
}];
@@ -1560,6 +1560,26 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [
1560
1560
let hasVerifier = 1;
1561
1561
}
1562
1562
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
+
1563
1583
//===----------------------------------------------------------------------===//
1564
1584
// 2.19.5.7 declare reduction Directive
1565
1585
//===----------------------------------------------------------------------===//
0 commit comments