@@ -534,6 +534,13 @@ static void processHostEvalClauses(lower::AbstractConverter &converter,
534534 cp.processCollapse (loc, eval, hostInfo->ops , hostInfo->iv );
535535 break ;
536536
537+ case OMPD_teams_workdistribute:
538+ cp.processThreadLimit (stmtCtx, hostInfo->ops );
539+ [[fallthrough]];
540+ case OMPD_target_teams_workdistribute:
541+ cp.processNumTeams (stmtCtx, hostInfo->ops );
542+ break ;
543+
537544 // Standalone 'target' case.
538545 case OMPD_target: {
539546 processSingleNestedIf (
@@ -2820,6 +2827,17 @@ genTeamsOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
28202827 queue, item, clauseOps);
28212828}
28222829
2830+ static mlir::omp::WorkdistributeOp genWorkdistributeOp (
2831+ lower::AbstractConverter &converter, lower::SymMap &symTable,
2832+ semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
2833+ mlir::Location loc, const ConstructQueue &queue,
2834+ ConstructQueue::const_iterator item) {
2835+ return genOpWithBody<mlir::omp::WorkdistributeOp>(
2836+ OpWithBodyGenInfo (converter, symTable, semaCtx, loc, eval,
2837+ llvm::omp::Directive::OMPD_workdistribute),
2838+ queue, item);
2839+ }
2840+
28232841// ===----------------------------------------------------------------------===//
28242842// Code generation functions for the standalone version of constructs that can
28252843// also be a leaf of a composite construct
@@ -3459,7 +3477,10 @@ static void genOMPDispatch(lower::AbstractConverter &converter,
34593477 case llvm::omp::Directive::OMPD_unroll:
34603478 genUnrollOp (converter, symTable, stmtCtx, semaCtx, eval, loc, queue, item);
34613479 break ;
3462- // case llvm::omp::Directive::OMPD_workdistribute:
3480+ case llvm::omp::Directive::OMPD_workdistribute:
3481+ newOp = genWorkdistributeOp (converter, symTable, semaCtx, eval, loc, queue,
3482+ item);
3483+ break ;
34633484 case llvm::omp::Directive::OMPD_workshare:
34643485 newOp = genWorkshareOp (converter, symTable, stmtCtx, semaCtx, eval, loc,
34653486 queue, item);
0 commit comments