Skip to content

Commit 85d6e3c

Browse files
authored
[MLIR][OpenMP][NFC] Document omp.section(s) block arguments (#98175)
Following discussion here: #97858 (comment)
1 parent 3742c2a commit 85d6e3c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def SectionOp : OpenMP_Op<"section", [HasParent<"SectionsOp">],
223223
let description = [{
224224
A section operation encloses a region which represents one section in a
225225
sections construct. A section op should always be surrounded by an
226-
`omp.sections` operation.
226+
`omp.sections` operation. The section operation may have block args
227+
which corespond to the block arguments of the surrounding `omp.sections`
228+
operation. This is done to reflect situations where these block arguments
229+
represent variables private to each section.
227230
}];
228231
let assemblyFormat = "$region attr-dict";
229232
}
@@ -242,6 +245,8 @@ def SectionsOp : OpenMP_Op<"sections", traits = [
242245
distributed among and executed by the threads in a team. Each `omp.section`
243246
is executed once by one of the threads in the team in the context of its
244247
implicit task.
248+
Block arguments for reduction variables should be mirrored in enclosed
249+
`omp.section` operations.
245250
}] # clausesDescription;
246251

247252
// Override region definition.

0 commit comments

Comments
 (0)