@@ -510,7 +510,7 @@ static void createBodyOfOp(Op &op, OpWithBodyGenInfo &info) {
510
510
511
511
// Start with privatization, so that the lowering of the nested
512
512
// code will use the right symbols.
513
- constexpr bool isLoop = std::is_same_v<Op, mlir::omp::WsLoopOp > ||
513
+ constexpr bool isLoop = std::is_same_v<Op, mlir::omp::WsloopOp > ||
514
514
std::is_same_v<Op, mlir::omp::SimdLoopOp>;
515
515
bool privatize = info.clauses && !info.outerCombined ;
516
516
@@ -611,7 +611,7 @@ static void genBodyOfTargetDataOp(
611
611
Fortran::lower::AbstractConverter &converter,
612
612
Fortran::semantics::SemanticsContext &semaCtx,
613
613
Fortran::lower::pft::Evaluation &eval, bool genNested,
614
- mlir::omp::DataOp &dataOp,
614
+ mlir::omp::TargetDataOp &dataOp,
615
615
const llvm::SmallVector<mlir::Type> &useDeviceTypes,
616
616
const llvm::SmallVector<mlir::Location> &useDeviceLocs,
617
617
const llvm::SmallVector<const Fortran::semantics::Symbol *>
@@ -822,7 +822,6 @@ genParallelOp(Fortran::lower::AbstractConverter &converter,
822
822
dsp.processStep2 ();
823
823
}
824
824
825
-
826
825
const auto &delayedPrivatizationInfo = dsp.getDelayedPrivatizationInfo ();
827
826
828
827
auto genRegionEntryCB = [&](mlir::Operation *op) {
@@ -977,8 +976,8 @@ genTaskOp(Fortran::lower::AbstractConverter &converter,
977
976
dependOperands, allocateOperands, allocatorOperands);
978
977
}
979
978
980
- static mlir::omp::TaskGroupOp
981
- genTaskGroupOp (Fortran::lower::AbstractConverter &converter,
979
+ static mlir::omp::TaskgroupOp
980
+ genTaskgroupOp (Fortran::lower::AbstractConverter &converter,
982
981
Fortran::semantics::SemanticsContext &semaCtx,
983
982
Fortran::lower::pft::Evaluation &eval, bool genNested,
984
983
mlir::Location currentLocation,
@@ -988,20 +987,20 @@ genTaskGroupOp(Fortran::lower::AbstractConverter &converter,
988
987
cp.processAllocate (allocatorOperands, allocateOperands);
989
988
cp.processTODO <Fortran::parser::OmpClause::TaskReduction>(
990
989
currentLocation, llvm::omp::Directive::OMPD_taskgroup);
991
- return genOpWithBody<mlir::omp::TaskGroupOp >(
990
+ return genOpWithBody<mlir::omp::TaskgroupOp >(
992
991
OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
993
992
.setGenNested (genNested)
994
993
.setClauses (&clauseList),
995
994
/* task_reduction_vars=*/ mlir::ValueRange (),
996
995
/* task_reductions=*/ nullptr , allocateOperands, allocatorOperands);
997
996
}
998
997
999
- static mlir::omp::DataOp
1000
- genDataOp (Fortran::lower::AbstractConverter &converter,
1001
- Fortran::semantics::SemanticsContext &semaCtx,
1002
- Fortran::lower::pft::Evaluation &eval, bool genNested,
1003
- mlir::Location currentLocation,
1004
- const Fortran::parser::OmpClauseList &clauseList) {
998
+ static mlir::omp::TargetDataOp
999
+ genTargetDataOp (Fortran::lower::AbstractConverter &converter,
1000
+ Fortran::semantics::SemanticsContext &semaCtx,
1001
+ Fortran::lower::pft::Evaluation &eval, bool genNested,
1002
+ mlir::Location currentLocation,
1003
+ const Fortran::parser::OmpClauseList &clauseList) {
1005
1004
Fortran::lower::StatementContext stmtCtx;
1006
1005
mlir::Value ifClauseOperand, deviceOperand;
1007
1006
llvm::SmallVector<mlir::Value> mapOperands, devicePtrOperands,
@@ -1021,7 +1020,7 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
1021
1020
cp.processMap (currentLocation, llvm::omp::Directive::OMPD_target_data,
1022
1021
stmtCtx, mapOperands);
1023
1022
1024
- auto dataOp = converter.getFirOpBuilder ().create <mlir::omp::DataOp >(
1023
+ auto dataOp = converter.getFirOpBuilder ().create <mlir::omp::TargetDataOp >(
1025
1024
currentLocation, ifClauseOperand, deviceOperand, devicePtrOperands,
1026
1025
deviceAddrOperands, mapOperands);
1027
1026
genBodyOfTargetDataOp (converter, semaCtx, eval, genNested, dataOp,
@@ -1031,11 +1030,11 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
1031
1030
}
1032
1031
1033
1032
template <typename OpTy>
1034
- static OpTy
1035
- genEnterExitUpdateDataOp ( Fortran::lower::AbstractConverter &converter,
1036
- Fortran::semantics::SemanticsContext &semaCtx,
1037
- mlir::Location currentLocation,
1038
- const Fortran::parser::OmpClauseList &clauseList) {
1033
+ static OpTy genTargetEnterExitDataUpdateOp (
1034
+ Fortran::lower::AbstractConverter &converter,
1035
+ Fortran::semantics::SemanticsContext &semaCtx,
1036
+ mlir::Location currentLocation,
1037
+ const Fortran::parser::OmpClauseList &clauseList) {
1039
1038
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder ();
1040
1039
Fortran::lower::StatementContext stmtCtx;
1041
1040
mlir::Value ifClauseOperand, deviceOperand;
@@ -1046,15 +1045,15 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
1046
1045
Fortran::parser::OmpIfClause::DirectiveNameModifier directiveName;
1047
1046
// GCC 9.3.0 emits a (probably) bogus warning about an unused variable.
1048
1047
[[maybe_unused]] llvm::omp::Directive directive;
1049
- if constexpr (std::is_same_v<OpTy, mlir::omp::EnterDataOp >) {
1048
+ if constexpr (std::is_same_v<OpTy, mlir::omp::TargetEnterDataOp >) {
1050
1049
directiveName =
1051
1050
Fortran::parser::OmpIfClause::DirectiveNameModifier::TargetEnterData;
1052
1051
directive = llvm::omp::Directive::OMPD_target_enter_data;
1053
- } else if constexpr (std::is_same_v<OpTy, mlir::omp::ExitDataOp >) {
1052
+ } else if constexpr (std::is_same_v<OpTy, mlir::omp::TargetExitDataOp >) {
1054
1053
directiveName =
1055
1054
Fortran::parser::OmpIfClause::DirectiveNameModifier::TargetExitData;
1056
1055
directive = llvm::omp::Directive::OMPD_target_exit_data;
1057
- } else if constexpr (std::is_same_v<OpTy, mlir::omp::UpdateDataOp >) {
1056
+ } else if constexpr (std::is_same_v<OpTy, mlir::omp::TargetUpdateOp >) {
1058
1057
directiveName =
1059
1058
Fortran::parser::OmpIfClause::DirectiveNameModifier::TargetUpdate;
1060
1059
directive = llvm::omp::Directive::OMPD_target_update;
@@ -1068,7 +1067,7 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
1068
1067
cp.processDepend (dependTypeOperands, dependOperands);
1069
1068
cp.processNowait (nowaitAttr);
1070
1069
1071
- if constexpr (std::is_same_v<OpTy, mlir::omp::UpdateDataOp >) {
1070
+ if constexpr (std::is_same_v<OpTy, mlir::omp::TargetUpdateOp >) {
1072
1071
cp.processMotionClauses <Fortran::parser::OmpClause::To>(stmtCtx,
1073
1072
mapOperands);
1074
1073
cp.processMotionClauses <Fortran::parser::OmpClause::From>(stmtCtx,
@@ -1265,7 +1264,7 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
1265
1264
1266
1265
ClauseProcessor cp (converter, semaCtx, clauseList);
1267
1266
cp.processIf (Fortran::parser::OmpIfClause::DirectiveNameModifier::Target,
1268
- ifClauseOperand);
1267
+ ifClauseOperand);
1269
1268
cp.processDevice (stmtCtx, deviceOperand);
1270
1269
cp.processThreadLimit (stmtCtx, threadLimitOperand);
1271
1270
cp.processDepend (dependTypeOperands, dependOperands);
@@ -1322,15 +1321,15 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
1322
1321
converter.getCurrentLocation ());
1323
1322
if (fir::unwrapRefType (info.addr .getType ()).isa <fir::BaseBoxType>())
1324
1323
bounds =
1325
- Fortran::lower::genBoundsOpsFromBox<mlir::omp::DataBoundsOp ,
1326
- mlir::omp::DataBoundsType >(
1324
+ Fortran::lower::genBoundsOpsFromBox<mlir::omp::MapBoundsOp ,
1325
+ mlir::omp::MapBoundsType >(
1327
1326
converter.getFirOpBuilder (), converter.getCurrentLocation (),
1328
1327
converter, dataExv, info);
1329
1328
if (fir::unwrapRefType (info.addr .getType ()).isa <fir::SequenceType>()) {
1330
1329
bool dataExvIsAssumedSize =
1331
1330
Fortran::semantics::IsAssumedSizeArray (sym.GetUltimate ());
1332
- bounds = Fortran::lower::genBaseBoundsOps<mlir::omp::DataBoundsOp ,
1333
- mlir::omp::DataBoundsType >(
1331
+ bounds = Fortran::lower::genBaseBoundsOps<mlir::omp::MapBoundsOp ,
1332
+ mlir::omp::MapBoundsType >(
1334
1333
converter.getFirOpBuilder (), converter.getCurrentLocation (),
1335
1334
converter, dataExv, dataExvIsAssumedSize);
1336
1335
}
@@ -1620,19 +1619,19 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
1620
1619
firOpBuilder.create <mlir::omp::TaskyieldOp>(currentLocation);
1621
1620
break ;
1622
1621
case llvm::omp::Directive::OMPD_target_data:
1623
- genDataOp (converter, semaCtx, eval, genNested, currentLocation,
1624
- opClauseList);
1622
+ genTargetDataOp (converter, semaCtx, eval, genNested, currentLocation,
1623
+ opClauseList);
1625
1624
break ;
1626
1625
case llvm::omp::Directive::OMPD_target_enter_data:
1627
- genEnterExitUpdateDataOp <mlir::omp::EnterDataOp >(
1626
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetEnterDataOp >(
1628
1627
converter, semaCtx, currentLocation, opClauseList);
1629
1628
break ;
1630
1629
case llvm::omp::Directive::OMPD_target_exit_data:
1631
- genEnterExitUpdateDataOp <mlir::omp::ExitDataOp >(
1630
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetExitDataOp >(
1632
1631
converter, semaCtx, currentLocation, opClauseList);
1633
1632
break ;
1634
1633
case llvm::omp::Directive::OMPD_target_update:
1635
- genEnterExitUpdateDataOp <mlir::omp::UpdateDataOp >(
1634
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetUpdateOp >(
1636
1635
converter, semaCtx, currentLocation, opClauseList);
1637
1636
break ;
1638
1637
case llvm::omp::Directive::OMPD_ordered:
@@ -1850,7 +1849,7 @@ createSimdLoop(Fortran::lower::AbstractConverter &converter,
1850
1849
.setGenRegionEntryCb (ivCallback));
1851
1850
}
1852
1851
1853
- static void createWsLoop (Fortran::lower::AbstractConverter &converter,
1852
+ static void createWsloop (Fortran::lower::AbstractConverter &converter,
1854
1853
Fortran::semantics::SemanticsContext &semaCtx,
1855
1854
Fortran::lower::pft::Evaluation &eval,
1856
1855
llvm::omp::Directive ompDirective,
@@ -1887,7 +1886,7 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1887
1886
convertLoopBounds (converter, loc, lowerBound, upperBound, step,
1888
1887
loopVarTypeSize);
1889
1888
1890
- auto wsLoopOp = firOpBuilder.create <mlir::omp::WsLoopOp >(
1889
+ auto wsLoopOp = firOpBuilder.create <mlir::omp::WsloopOp >(
1891
1890
loc, lowerBound, upperBound, step, linearVars, linearStepVars,
1892
1891
reductionVars,
1893
1892
reductionDeclSymbols.empty ()
@@ -1934,7 +1933,7 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1934
1933
reductionTypes);
1935
1934
};
1936
1935
1937
- createBodyOfOp<mlir::omp::WsLoopOp >(
1936
+ createBodyOfOp<mlir::omp::WsloopOp >(
1938
1937
wsLoopOp, OpWithBodyGenInfo (converter, semaCtx, loc, *nestedEval)
1939
1938
.setClauses (&beginClauseList)
1940
1939
.setDataSharingProcessor (&dsp)
@@ -1962,7 +1961,7 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1962
1961
}
1963
1962
}
1964
1963
1965
- static void createSimdWsLoop (
1964
+ static void createSimdWsloop (
1966
1965
Fortran::lower::AbstractConverter &converter,
1967
1966
Fortran::semantics::SemanticsContext &semaCtx,
1968
1967
Fortran::lower::pft::Evaluation &eval, llvm::omp::Directive ompDirective,
@@ -1983,7 +1982,7 @@ static void createSimdWsLoop(
1983
1982
// if clause. Currently if clause can be skipped because we always assume
1984
1983
// SIMD length = 1.
1985
1984
DataSharingProcessor dsp (converter, beginClauseList, eval);
1986
- createWsLoop (converter, semaCtx, eval, ompDirective, beginClauseList,
1985
+ createWsloop (converter, semaCtx, eval, ompDirective, beginClauseList,
1987
1986
endClauseList, loc, dsp);
1988
1987
}
1989
1988
@@ -2058,7 +2057,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
2058
2057
2059
2058
if (llvm::omp::allDoSimdSet.test (ompDirective)) {
2060
2059
// 2.9.3.2 Workshare SIMD construct
2061
- createSimdWsLoop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
2060
+ createSimdWsloop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
2062
2061
endClauseList, currentLocation);
2063
2062
2064
2063
} else if (llvm::omp::allSimdSet.test (ompDirective)) {
@@ -2067,7 +2066,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
2067
2066
currentLocation);
2068
2067
genOpenMPReduction (converter, semaCtx, loopOpClauseList);
2069
2068
} else {
2070
- createWsLoop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
2069
+ createWsloop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
2071
2070
endClauseList, currentLocation, dsp);
2072
2071
}
2073
2072
}
@@ -2144,15 +2143,15 @@ genOMP(Fortran::lower::AbstractConverter &converter,
2144
2143
beginClauseList, directive.v );
2145
2144
break ;
2146
2145
case llvm::omp::Directive::OMPD_target_data:
2147
- genDataOp (converter, semaCtx, eval, /* genNested=*/ true , currentLocation ,
2148
- beginClauseList);
2146
+ genTargetDataOp (converter, semaCtx, eval, /* genNested=*/ true ,
2147
+ currentLocation, beginClauseList);
2149
2148
break ;
2150
2149
case llvm::omp::Directive::OMPD_task:
2151
2150
genTaskOp (converter, semaCtx, eval, /* genNested=*/ true , currentLocation,
2152
2151
beginClauseList);
2153
2152
break ;
2154
2153
case llvm::omp::Directive::OMPD_taskgroup:
2155
- genTaskGroupOp (converter, semaCtx, eval, /* genNested=*/ true ,
2154
+ genTaskgroupOp (converter, semaCtx, eval, /* genNested=*/ true ,
2156
2155
currentLocation, beginClauseList);
2157
2156
break ;
2158
2157
case llvm::omp::Directive::OMPD_teams:
@@ -2505,7 +2504,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
2505
2504
mlir::Operation *Fortran::lower::genOpenMPTerminator (fir::FirOpBuilder &builder,
2506
2505
mlir::Operation *op,
2507
2506
mlir::Location loc) {
2508
- if (mlir::isa<mlir::omp::WsLoopOp , mlir::omp::ReductionDeclareOp ,
2507
+ if (mlir::isa<mlir::omp::WsloopOp , mlir::omp::DeclareReductionOp ,
2509
2508
mlir::omp::AtomicUpdateOp, mlir::omp::SimdLoopOp>(op))
2510
2509
return builder.create <mlir::omp::YieldOp>(loc);
2511
2510
else
0 commit comments