@@ -734,9 +734,7 @@ genTaskOp(Fortran::lower::AbstractConverter &converter,
734734 cp.processMergeable (mergeableAttr);
735735 cp.processPriority (stmtCtx, priorityClauseOperand);
736736 cp.processDepend (dependTypeOperands, dependOperands);
737- cp.processTODO <Fortran::parser::OmpClause::InReduction,
738- Fortran::parser::OmpClause::Detach,
739- Fortran::parser::OmpClause::Affinity>(
737+ cp.processTODO <clause::InReduction, clause::Detach, clause::Affinity>(
740738 currentLocation, llvm::omp::Directive::OMPD_task);
741739
742740 return genOpWithBody<mlir::omp::TaskOp>(
@@ -762,8 +760,8 @@ genTaskgroupOp(Fortran::lower::AbstractConverter &converter,
762760 llvm::SmallVector<mlir::Value> allocateOperands, allocatorOperands;
763761 ClauseProcessor cp (converter, semaCtx, clauseList);
764762 cp.processAllocate (allocatorOperands, allocateOperands);
765- cp.processTODO <Fortran::parser::OmpClause:: TaskReduction>(
766- currentLocation, llvm::omp::Directive::OMPD_taskgroup);
763+ cp.processTODO <clause:: TaskReduction>(currentLocation,
764+ llvm::omp::Directive::OMPD_taskgroup);
767765 return genOpWithBody<mlir::omp::TaskgroupOp>(
768766 OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
769767 .setGenNested (genNested)
@@ -1102,16 +1100,11 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
11021100 cp.processMap (currentLocation, directive, stmtCtx, mapOperands, &mapSymTypes,
11031101 &mapSymLocs, &mapSymbols);
11041102
1105- cp.processTODO <Fortran::parser::OmpClause::Private,
1106- Fortran::parser::OmpClause::Firstprivate,
1107- Fortran::parser::OmpClause::IsDevicePtr,
1108- Fortran::parser::OmpClause::HasDeviceAddr,
1109- Fortran::parser::OmpClause::Reduction,
1110- Fortran::parser::OmpClause::InReduction,
1111- Fortran::parser::OmpClause::Allocate,
1112- Fortran::parser::OmpClause::UsesAllocators,
1113- Fortran::parser::OmpClause::Defaultmap>(
1103+ cp.processTODO <clause::Private, clause::Firstprivate, clause::IsDevicePtr,
1104+ clause::HasDeviceAddr, clause::Reduction, clause::InReduction,
1105+ clause::Allocate, clause::UsesAllocators, clause::Defaultmap>(
11141106 currentLocation, llvm::omp::Directive::OMPD_target);
1107+
11151108 // 5.8.1 Implicit Data-Mapping Attribute Rules
11161109 // The following code follows the implicit data-mapping rules to map all the
11171110 // symbols used inside the region that have not been explicitly mapped using
@@ -1230,8 +1223,8 @@ genTeamsOp(Fortran::lower::AbstractConverter &converter,
12301223 cp.processDefault ();
12311224 cp.processNumTeams (stmtCtx, numTeamsClauseOperand);
12321225 cp.processThreadLimit (stmtCtx, threadLimitClauseOperand);
1233- cp.processTODO <Fortran::parser::OmpClause:: Reduction>(
1234- currentLocation, llvm::omp::Directive::OMPD_teams);
1226+ cp.processTODO <clause:: Reduction>(currentLocation,
1227+ llvm::omp::Directive::OMPD_teams);
12351228
12361229 return genOpWithBody<mlir::omp::TeamsOp>(
12371230 OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
@@ -1283,9 +1276,8 @@ static mlir::omp::DeclareTargetDeviceType getDeclareTargetInfo(
12831276 cp.processEnter (symbolAndClause);
12841277 cp.processLink (symbolAndClause);
12851278 cp.processDeviceType (deviceType);
1286- cp.processTODO <Fortran::parser::OmpClause::Indirect>(
1287- converter.getCurrentLocation (),
1288- llvm::omp::Directive::OMPD_declare_target);
1279+ cp.processTODO <clause::Indirect>(converter.getCurrentLocation (),
1280+ llvm::omp::Directive::OMPD_declare_target);
12891281 }
12901282
12911283 return deviceType;
@@ -1367,8 +1359,7 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
13671359 break ;
13681360 case llvm::omp::Directive::OMPD_taskwait:
13691361 ClauseProcessor (converter, semaCtx, opClauseList)
1370- .processTODO <Fortran::parser::OmpClause::Depend,
1371- Fortran::parser::OmpClause::Nowait>(
1362+ .processTODO <clause::Depend, clause::Nowait>(
13721363 currentLocation, llvm::omp::Directive::OMPD_taskwait);
13731364 firOpBuilder.create <mlir::omp::TaskwaitOp>(currentLocation);
13741365 break ;
@@ -1550,11 +1541,8 @@ createSimdLoop(Fortran::lower::AbstractConverter &converter,
15501541 cp.processIf (clause::If::DirectiveNameModifier::Simd, ifClauseOperand);
15511542 cp.processSimdlen (simdlenClauseOperand);
15521543 cp.processSafelen (safelenClauseOperand);
1553- cp.processTODO <Fortran::parser::OmpClause::Aligned,
1554- Fortran::parser::OmpClause::Allocate,
1555- Fortran::parser::OmpClause::Linear,
1556- Fortran::parser::OmpClause::Nontemporal,
1557- Fortran::parser::OmpClause::Order>(loc, ompDirective);
1544+ cp.processTODO <clause::Aligned, clause::Allocate, clause::Linear,
1545+ clause::Nontemporal, clause::Order>(loc, ompDirective);
15581546
15591547 mlir::TypeRange resultType;
15601548 auto simdLoopOp = firOpBuilder.create <mlir::omp::SimdLoopOp>(
@@ -1607,8 +1595,7 @@ static void createWsloop(Fortran::lower::AbstractConverter &converter,
16071595 cp.processScheduleChunk (stmtCtx, scheduleChunkClauseOperand);
16081596 cp.processReduction (loc, reductionVars, reductionTypes, reductionDeclSymbols,
16091597 &reductionSymbols);
1610- cp.processTODO <Fortran::parser::OmpClause::Linear,
1611- Fortran::parser::OmpClause::Order>(loc, ompDirective);
1598+ cp.processTODO <clause::Linear, clause::Order>(loc, ompDirective);
16121599
16131600 if (ReductionProcessor::doReductionByRef (reductionVars))
16141601 byrefOperand = firOpBuilder.getUnitAttr ();
@@ -1670,11 +1657,9 @@ static void createSimdWsloop(
16701657 const Fortran::parser::OmpClauseList &beginClauseList,
16711658 const Fortran::parser::OmpClauseList *endClauseList, mlir::Location loc) {
16721659 ClauseProcessor cp (converter, semaCtx, beginClauseList);
1673- cp.processTODO <
1674- Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate,
1675- Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Safelen,
1676- Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Order>(
1677- loc, ompDirective);
1660+ cp.processTODO <clause::Aligned, clause::Allocate, clause::Linear,
1661+ clause::Safelen, clause::Simdlen, clause::Order>(loc,
1662+ ompDirective);
16781663 // TODO: Add support for vectorization - add vectorization hints inside loop
16791664 // body.
16801665 // OpenMP standard does not specify the length of vector instructions.
0 commit comments