[flang-commits] [flang] [mlir] [MLIR][OpenMP] Support for dispatch construct with clauses nocontext & novariants (PR #215877)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Wed Sep 9 07:17:53 PDT 2026


================
@@ -2425,6 +2425,37 @@ def MaskedOp : OpenMP_Op<"masked", traits = [
   ];
 }
 
+//===----------------------------------------------------------------------===//
+// [Spec 5.2] 7.6 dispatch Construct
+//===----------------------------------------------------------------------===//
+def DispatchOp : OpenMP_Op<"dispatch", traits = [
+    AttrSizedOperandSegments, NoRegionArguments
+  ], clauses = [
+    // TODO: Complete clause list (device, depend, is_device_ptr).
+    OpenMP_NocontextClause, OpenMP_NovariantsClause, OpenMP_NowaitClause
+  ], singleRegion = true> {
+  let summary = "dispatch construct";
+  let description = [{
+    The dispatch construct enables the invocation of a variant of a
+    base procedure. It was introduced in OpenMP 5.0; the section numbers cited
----------------
abidh wrote:

I think it was introduced in 5.1. Similar text exist in other places too.

https://github.com/llvm/llvm-project/pull/215877


More information about the flang-commits mailing list