@@ -734,9 +734,7 @@ genTaskOp(Fortran::lower::AbstractConverter &converter,
734
734
cp.processMergeable (mergeableAttr);
735
735
cp.processPriority (stmtCtx, priorityClauseOperand);
736
736
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>(
740
738
currentLocation, llvm::omp::Directive::OMPD_task);
741
739
742
740
return genOpWithBody<mlir::omp::TaskOp>(
@@ -762,8 +760,8 @@ genTaskgroupOp(Fortran::lower::AbstractConverter &converter,
762
760
llvm::SmallVector<mlir::Value> allocateOperands, allocatorOperands;
763
761
ClauseProcessor cp (converter, semaCtx, clauseList);
764
762
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);
767
765
return genOpWithBody<mlir::omp::TaskgroupOp>(
768
766
OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
769
767
.setGenNested (genNested)
@@ -1102,16 +1100,11 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
1102
1100
cp.processMap (currentLocation, directive, stmtCtx, mapOperands, &mapSymTypes,
1103
1101
&mapSymLocs, &mapSymbols);
1104
1102
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>(
1114
1106
currentLocation, llvm::omp::Directive::OMPD_target);
1107
+
1115
1108
// 5.8.1 Implicit Data-Mapping Attribute Rules
1116
1109
// The following code follows the implicit data-mapping rules to map all the
1117
1110
// symbols used inside the region that have not been explicitly mapped using
@@ -1230,8 +1223,8 @@ genTeamsOp(Fortran::lower::AbstractConverter &converter,
1230
1223
cp.processDefault ();
1231
1224
cp.processNumTeams (stmtCtx, numTeamsClauseOperand);
1232
1225
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);
1235
1228
1236
1229
return genOpWithBody<mlir::omp::TeamsOp>(
1237
1230
OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
@@ -1283,9 +1276,8 @@ static mlir::omp::DeclareTargetDeviceType getDeclareTargetInfo(
1283
1276
cp.processEnter (symbolAndClause);
1284
1277
cp.processLink (symbolAndClause);
1285
1278
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);
1289
1281
}
1290
1282
1291
1283
return deviceType;
@@ -1367,8 +1359,7 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
1367
1359
break ;
1368
1360
case llvm::omp::Directive::OMPD_taskwait:
1369
1361
ClauseProcessor (converter, semaCtx, opClauseList)
1370
- .processTODO <Fortran::parser::OmpClause::Depend,
1371
- Fortran::parser::OmpClause::Nowait>(
1362
+ .processTODO <clause::Depend, clause::Nowait>(
1372
1363
currentLocation, llvm::omp::Directive::OMPD_taskwait);
1373
1364
firOpBuilder.create <mlir::omp::TaskwaitOp>(currentLocation);
1374
1365
break ;
@@ -1550,11 +1541,8 @@ createSimdLoop(Fortran::lower::AbstractConverter &converter,
1550
1541
cp.processIf (clause::If::DirectiveNameModifier::Simd, ifClauseOperand);
1551
1542
cp.processSimdlen (simdlenClauseOperand);
1552
1543
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);
1558
1546
1559
1547
mlir::TypeRange resultType;
1560
1548
auto simdLoopOp = firOpBuilder.create <mlir::omp::SimdLoopOp>(
@@ -1607,8 +1595,7 @@ static void createWsloop(Fortran::lower::AbstractConverter &converter,
1607
1595
cp.processScheduleChunk (stmtCtx, scheduleChunkClauseOperand);
1608
1596
cp.processReduction (loc, reductionVars, reductionTypes, reductionDeclSymbols,
1609
1597
&reductionSymbols);
1610
- cp.processTODO <Fortran::parser::OmpClause::Linear,
1611
- Fortran::parser::OmpClause::Order>(loc, ompDirective);
1598
+ cp.processTODO <clause::Linear, clause::Order>(loc, ompDirective);
1612
1599
1613
1600
if (ReductionProcessor::doReductionByRef (reductionVars))
1614
1601
byrefOperand = firOpBuilder.getUnitAttr ();
@@ -1670,11 +1657,9 @@ static void createSimdWsloop(
1670
1657
const Fortran::parser::OmpClauseList &beginClauseList,
1671
1658
const Fortran::parser::OmpClauseList *endClauseList, mlir::Location loc) {
1672
1659
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);
1678
1663
// TODO: Add support for vectorization - add vectorization hints inside loop
1679
1664
// body.
1680
1665
// OpenMP standard does not specify the length of vector instructions.
0 commit comments