@@ -2172,28 +2172,22 @@ static bool genOMPCompositeDispatch(
2172
2172
mlir::Location loc, const ConstructQueue &queue,
2173
2173
ConstructQueue::const_iterator item, DataSharingProcessor &dsp) {
2174
2174
using llvm::omp::Directive;
2175
- using llvm::omp::getLeafConstructs, lower::omp::matchLeafSequence;
2175
+ using lower::omp::matchLeafSequence;
2176
2176
2177
- if (matchLeafSequence (
2178
- item, queue,
2179
- getLeafConstructs (Directive::OMPD_distribute_parallel_do)))
2177
+ if (matchLeafSequence (item, queue, Directive::OMPD_distribute_parallel_do))
2180
2178
genCompositeDistributeParallelDo (converter, symTable, semaCtx, eval, loc,
2181
2179
queue, item, dsp);
2182
- else if (matchLeafSequence (
2183
- item, queue,
2184
- getLeafConstructs (Directive::OMPD_distribute_parallel_do_simd)))
2180
+ else if (matchLeafSequence (item, queue,
2181
+ Directive::OMPD_distribute_parallel_do_simd))
2185
2182
genCompositeDistributeParallelDoSimd (converter, symTable, semaCtx, eval,
2186
2183
loc, queue, item, dsp);
2187
- else if (matchLeafSequence (
2188
- item, queue, getLeafConstructs (Directive::OMPD_distribute_simd)))
2184
+ else if (matchLeafSequence (item, queue, Directive::OMPD_distribute_simd))
2189
2185
genCompositeDistributeSimd (converter, symTable, semaCtx, eval, loc, queue,
2190
2186
item, dsp);
2191
- else if (matchLeafSequence (item, queue,
2192
- getLeafConstructs (Directive::OMPD_do_simd)))
2187
+ else if (matchLeafSequence (item, queue, Directive::OMPD_do_simd))
2193
2188
genCompositeDoSimd (converter, symTable, semaCtx, eval, loc, queue, item,
2194
2189
dsp);
2195
- else if (matchLeafSequence (item, queue,
2196
- getLeafConstructs (Directive::OMPD_taskloop_simd)))
2190
+ else if (matchLeafSequence (item, queue, Directive::OMPD_taskloop_simd))
2197
2191
genCompositeTaskloopSimd (converter, symTable, semaCtx, eval, loc, queue,
2198
2192
item, dsp);
2199
2193
else
@@ -2322,18 +2316,11 @@ static void genOMPDispatch(lower::AbstractConverter &converter,
2322
2316
// that use this construct, add a single construct for now.
2323
2317
genSingleOp (converter, symTable, semaCtx, eval, loc, queue, item);
2324
2318
break ;
2325
-
2326
- // Composite constructs
2327
- case llvm::omp::Directive::OMPD_distribute_parallel_do:
2328
- case llvm::omp::Directive::OMPD_distribute_parallel_do_simd:
2329
- case llvm::omp::Directive::OMPD_distribute_simd:
2330
- case llvm::omp::Directive::OMPD_do_simd:
2331
- case llvm::omp::Directive::OMPD_taskloop_simd:
2332
- // Composite constructs should have been split into a sequence of leaf
2333
- // constructs and lowered by genOMPCompositeDispatch().
2334
- llvm_unreachable (" Unexpected composite construct." );
2335
- break ;
2336
2319
default :
2320
+ // Combined and composite constructs should have been split into a sequence
2321
+ // of leaf constructs when building the construct queue.
2322
+ assert (!llvm::omp::isLeafConstruct (dir) &&
2323
+ " Unexpected compound construct." );
2337
2324
break ;
2338
2325
}
2339
2326
0 commit comments