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