[llvm-branch-commits] [flang] [llvm] [Flang][OpenMP] Prevent re-composition of composite constructs (PR #102613)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 9 07:31:34 PDT 2024


================
@@ -2263,24 +2321,13 @@ static void genOMPDispatch(lower::AbstractConverter &converter,
 
   // Composite constructs
   case llvm::omp::Directive::OMPD_distribute_parallel_do:
-    genCompositeDistributeParallelDo(converter, symTable, semaCtx, eval, loc,
-                                     queue, item, *loopDsp);
-    break;
   case llvm::omp::Directive::OMPD_distribute_parallel_do_simd:
-    genCompositeDistributeParallelDoSimd(converter, symTable, semaCtx, eval,
-                                         loc, queue, item, *loopDsp);
-    break;
   case llvm::omp::Directive::OMPD_distribute_simd:
-    genCompositeDistributeSimd(converter, symTable, semaCtx, eval, loc, queue,
-                               item, *loopDsp);
-    break;
   case llvm::omp::Directive::OMPD_do_simd:
-    genCompositeDoSimd(converter, symTable, semaCtx, eval, loc, queue, item,
-                       *loopDsp);
-    break;
   case llvm::omp::Directive::OMPD_taskloop_simd:
-    genCompositeTaskloopSimd(converter, symTable, semaCtx, eval, loc, queue,
-                             item, *loopDsp);
+    // Composite constructs should have been split into a sequence of leaf
+    // constructs and lowered by genOMPCompositeDispatch().
+    llvm_unreachable("Unexpected composite construct.");
     break;
   default:
----------------
skatrak wrote:

Done. I added a bit more generic assert, since we don't expect combined constructs there either.

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


More information about the llvm-branch-commits mailing list