[Mlir-commits] [mlir] 85d6e3c - [MLIR][OpenMP][NFC] Document omp.section(s) block arguments (#98175)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jul 10 04:21:52 PDT 2024


Author: Tom Eccles
Date: 2024-07-10T12:21:49+01:00
New Revision: 85d6e3cac7150f32cdbe69194ee86747684b3cfa

URL: https://github.com/llvm/llvm-project/commit/85d6e3cac7150f32cdbe69194ee86747684b3cfa
DIFF: https://github.com/llvm/llvm-project/commit/85d6e3cac7150f32cdbe69194ee86747684b3cfa.diff

LOG: [MLIR][OpenMP][NFC] Document omp.section(s) block arguments (#98175)

Following discussion here:
https://github.com/llvm/llvm-project/pull/97858#discussion_r1670173102

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
index ab1fb649fcfde..aee2937ce5cb7 100644
--- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
@@ -223,7 +223,10 @@ def SectionOp : OpenMP_Op<"section", [HasParent<"SectionsOp">],
   let description = [{
     A section operation encloses a region which represents one section in a
     sections construct. A section op should always be surrounded by an
-    `omp.sections` operation.
+    `omp.sections` operation. The section operation may have block args
+    which corespond to the block arguments of the surrounding `omp.sections`
+    operation. This is done to reflect situations where these block arguments
+    represent variables private to each section.
   }];
   let assemblyFormat = "$region attr-dict";
 }
@@ -242,6 +245,8 @@ def SectionsOp : OpenMP_Op<"sections", traits = [
     distributed among and executed by the threads in a team. Each `omp.section`
     is executed once by one of the threads in the team in the context of its
     implicit task.
+    Block arguments for reduction variables should be mirrored in enclosed
+    `omp.section` operations.
   }] # clausesDescription;
 
   // Override region definition.


        


More information about the Mlir-commits mailing list