================
@@ -2141,13 +2154,50 @@ static void genCompositeTaskloopSimd(
     semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
     mlir::Location loc, const ConstructQueue &queue,
     ConstructQueue::const_iterator item, DataSharingProcessor &dsp) {
+  assert(std::distance(item, queue.end()) == 2 && "Invalid leaf constructs");
   TODO(loc, "Composite TASKLOOP SIMD");
 }
 
 
//===----------------------------------------------------------------------===//
 // Dispatch
 
//===----------------------------------------------------------------------===//
 
+static bool genOMPCompositeDispatch(
+    lower::AbstractConverter &converter, lower::SymMap &symTable,
+    semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
+    mlir::Location loc, const ConstructQueue &queue,
+    ConstructQueue::const_iterator item, DataSharingProcessor &dsp) {
+  using llvm::omp::Directive;
+  using llvm::omp::getLeafConstructs, lower::omp::matchLeafSequence;
+
+  if (matchLeafSequence(
+          item, queue,
+          getLeafConstructs(Directive::OMPD_distribute_parallel_do)))
----------------
kparzysz wrote:

Maybe `matchLeafSequence` could take the directive, and call 
`getLeafConstructs` itself.  It would make these calls a bit tidier...

https://github.com/llvm/llvm-project/pull/102613
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to