@@ -365,7 +365,7 @@ static void createBodyOfOp(Op &op, OpWithBodyGenInfo &info) {
365
365
366
366
// Start with privatization, so that the lowering of the nested
367
367
// code will use the right symbols.
368
- constexpr bool isLoop = std::is_same_v<Op, mlir::omp::WsLoopOp > ||
368
+ constexpr bool isLoop = std::is_same_v<Op, mlir::omp::WsloopOp > ||
369
369
std::is_same_v<Op, mlir::omp::SimdLoopOp>;
370
370
bool privatize = info.clauses && !info.outerCombined ;
371
371
@@ -465,7 +465,7 @@ static void genBodyOfTargetDataOp(
465
465
Fortran::lower::AbstractConverter &converter,
466
466
Fortran::semantics::SemanticsContext &semaCtx,
467
467
Fortran::lower::pft::Evaluation &eval, bool genNested,
468
- mlir::omp::DataOp &dataOp, llvm::ArrayRef<mlir::Type> useDeviceTypes,
468
+ mlir::omp::TargetDataOp &dataOp, llvm::ArrayRef<mlir::Type> useDeviceTypes,
469
469
llvm::ArrayRef<mlir::Location> useDeviceLocs,
470
470
llvm::ArrayRef<const Fortran::semantics::Symbol *> useDeviceSymbols,
471
471
const mlir::Location ¤tLocation) {
@@ -775,8 +775,8 @@ genTaskOp(Fortran::lower::AbstractConverter &converter,
775
775
dependOperands, allocateOperands, allocatorOperands);
776
776
}
777
777
778
- static mlir::omp::TaskGroupOp
779
- genTaskGroupOp (Fortran::lower::AbstractConverter &converter,
778
+ static mlir::omp::TaskgroupOp
779
+ genTaskgroupOp (Fortran::lower::AbstractConverter &converter,
780
780
Fortran::semantics::SemanticsContext &semaCtx,
781
781
Fortran::lower::pft::Evaluation &eval, bool genNested,
782
782
mlir::Location currentLocation,
@@ -786,7 +786,7 @@ genTaskGroupOp(Fortran::lower::AbstractConverter &converter,
786
786
cp.processAllocate (allocatorOperands, allocateOperands);
787
787
cp.processTODO <Fortran::parser::OmpClause::TaskReduction>(
788
788
currentLocation, llvm::omp::Directive::OMPD_taskgroup);
789
- return genOpWithBody<mlir::omp::TaskGroupOp >(
789
+ return genOpWithBody<mlir::omp::TaskgroupOp >(
790
790
OpWithBodyGenInfo (converter, semaCtx, currentLocation, eval)
791
791
.setGenNested (genNested)
792
792
.setClauses (&clauseList),
@@ -847,12 +847,12 @@ static void promoteNonCPtrUseDevicePtrArgsToUseDeviceAddr(
847
847
}
848
848
}
849
849
850
- static mlir::omp::DataOp
851
- genDataOp (Fortran::lower::AbstractConverter &converter,
852
- Fortran::semantics::SemanticsContext &semaCtx,
853
- Fortran::lower::pft::Evaluation &eval, bool genNested,
854
- mlir::Location currentLocation,
855
- const Fortran::parser::OmpClauseList &clauseList) {
850
+ static mlir::omp::TargetDataOp
851
+ genTargetDataOp (Fortran::lower::AbstractConverter &converter,
852
+ Fortran::semantics::SemanticsContext &semaCtx,
853
+ Fortran::lower::pft::Evaluation &eval, bool genNested,
854
+ mlir::Location currentLocation,
855
+ const Fortran::parser::OmpClauseList &clauseList) {
856
856
Fortran::lower::StatementContext stmtCtx;
857
857
mlir::Value ifClauseOperand, deviceOperand;
858
858
llvm::SmallVector<mlir::Value> mapOperands, devicePtrOperands,
@@ -885,7 +885,7 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
885
885
cp.processMap (currentLocation, llvm::omp::Directive::OMPD_target_data,
886
886
stmtCtx, mapOperands);
887
887
888
- auto dataOp = converter.getFirOpBuilder ().create <mlir::omp::DataOp >(
888
+ auto dataOp = converter.getFirOpBuilder ().create <mlir::omp::TargetDataOp >(
889
889
currentLocation, ifClauseOperand, deviceOperand, devicePtrOperands,
890
890
deviceAddrOperands, mapOperands);
891
891
genBodyOfTargetDataOp (converter, semaCtx, eval, genNested, dataOp,
@@ -895,11 +895,11 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
895
895
}
896
896
897
897
template <typename OpTy>
898
- static OpTy
899
- genEnterExitUpdateDataOp ( Fortran::lower::AbstractConverter &converter,
900
- Fortran::semantics::SemanticsContext &semaCtx,
901
- mlir::Location currentLocation,
902
- const Fortran::parser::OmpClauseList &clauseList) {
898
+ static OpTy genTargetEnterExitDataUpdateOp (
899
+ Fortran::lower::AbstractConverter &converter,
900
+ Fortran::semantics::SemanticsContext &semaCtx,
901
+ mlir::Location currentLocation,
902
+ const Fortran::parser::OmpClauseList &clauseList) {
903
903
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder ();
904
904
Fortran::lower::StatementContext stmtCtx;
905
905
mlir::Value ifClauseOperand, deviceOperand;
@@ -910,13 +910,13 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
910
910
clause::If::DirectiveNameModifier directiveName;
911
911
// GCC 9.3.0 emits a (probably) bogus warning about an unused variable.
912
912
[[maybe_unused]] llvm::omp::Directive directive;
913
- if constexpr (std::is_same_v<OpTy, mlir::omp::EnterDataOp >) {
913
+ if constexpr (std::is_same_v<OpTy, mlir::omp::TargetEnterDataOp >) {
914
914
directiveName = clause::If::DirectiveNameModifier::TargetEnterData;
915
915
directive = llvm::omp::Directive::OMPD_target_enter_data;
916
- } else if constexpr (std::is_same_v<OpTy, mlir::omp::ExitDataOp >) {
916
+ } else if constexpr (std::is_same_v<OpTy, mlir::omp::TargetExitDataOp >) {
917
917
directiveName = clause::If::DirectiveNameModifier::TargetExitData;
918
918
directive = llvm::omp::Directive::OMPD_target_exit_data;
919
- } else if constexpr (std::is_same_v<OpTy, mlir::omp::UpdateDataOp >) {
919
+ } else if constexpr (std::is_same_v<OpTy, mlir::omp::TargetUpdateOp >) {
920
920
directiveName = clause::If::DirectiveNameModifier::TargetUpdate;
921
921
directive = llvm::omp::Directive::OMPD_target_update;
922
922
} else {
@@ -929,7 +929,7 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
929
929
cp.processDepend (dependTypeOperands, dependOperands);
930
930
cp.processNowait (nowaitAttr);
931
931
932
- if constexpr (std::is_same_v<OpTy, mlir::omp::UpdateDataOp >) {
932
+ if constexpr (std::is_same_v<OpTy, mlir::omp::TargetUpdateOp >) {
933
933
cp.processMotionClauses <Fortran::parser::OmpClause::To>(stmtCtx,
934
934
mapOperands);
935
935
cp.processMotionClauses <Fortran::parser::OmpClause::From>(stmtCtx,
@@ -1162,15 +1162,15 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
1162
1162
converter.getCurrentLocation ());
1163
1163
if (fir::unwrapRefType (info.addr .getType ()).isa <fir::BaseBoxType>())
1164
1164
bounds =
1165
- Fortran::lower::genBoundsOpsFromBox<mlir::omp::DataBoundsOp ,
1166
- mlir::omp::DataBoundsType >(
1165
+ Fortran::lower::genBoundsOpsFromBox<mlir::omp::MapBoundsOp ,
1166
+ mlir::omp::MapBoundsType >(
1167
1167
converter.getFirOpBuilder (), converter.getCurrentLocation (),
1168
1168
converter, dataExv, info);
1169
1169
if (fir::unwrapRefType (info.addr .getType ()).isa <fir::SequenceType>()) {
1170
1170
bool dataExvIsAssumedSize =
1171
1171
Fortran::semantics::IsAssumedSizeArray (sym.GetUltimate ());
1172
- bounds = Fortran::lower::genBaseBoundsOps<mlir::omp::DataBoundsOp ,
1173
- mlir::omp::DataBoundsType >(
1172
+ bounds = Fortran::lower::genBaseBoundsOps<mlir::omp::MapBoundsOp ,
1173
+ mlir::omp::MapBoundsType >(
1174
1174
converter.getFirOpBuilder (), converter.getCurrentLocation (),
1175
1175
converter, dataExv, dataExvIsAssumedSize);
1176
1176
}
@@ -1401,19 +1401,19 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
1401
1401
firOpBuilder.create <mlir::omp::TaskyieldOp>(currentLocation);
1402
1402
break ;
1403
1403
case llvm::omp::Directive::OMPD_target_data:
1404
- genDataOp (converter, semaCtx, eval, genNested, currentLocation,
1405
- opClauseList);
1404
+ genTargetDataOp (converter, semaCtx, eval, genNested, currentLocation,
1405
+ opClauseList);
1406
1406
break ;
1407
1407
case llvm::omp::Directive::OMPD_target_enter_data:
1408
- genEnterExitUpdateDataOp <mlir::omp::EnterDataOp >(
1408
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetEnterDataOp >(
1409
1409
converter, semaCtx, currentLocation, opClauseList);
1410
1410
break ;
1411
1411
case llvm::omp::Directive::OMPD_target_exit_data:
1412
- genEnterExitUpdateDataOp <mlir::omp::ExitDataOp >(
1412
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetExitDataOp >(
1413
1413
converter, semaCtx, currentLocation, opClauseList);
1414
1414
break ;
1415
1415
case llvm::omp::Directive::OMPD_target_update:
1416
- genEnterExitUpdateDataOp <mlir::omp::UpdateDataOp >(
1416
+ genTargetEnterExitDataUpdateOp <mlir::omp::TargetUpdateOp >(
1417
1417
converter, semaCtx, currentLocation, opClauseList);
1418
1418
break ;
1419
1419
case llvm::omp::Directive::OMPD_ordered:
@@ -1625,7 +1625,7 @@ createSimdLoop(Fortran::lower::AbstractConverter &converter,
1625
1625
.setGenRegionEntryCb (ivCallback));
1626
1626
}
1627
1627
1628
- static void createWsLoop (Fortran::lower::AbstractConverter &converter,
1628
+ static void createWsloop (Fortran::lower::AbstractConverter &converter,
1629
1629
Fortran::semantics::SemanticsContext &semaCtx,
1630
1630
Fortran::lower::pft::Evaluation &eval,
1631
1631
llvm::omp::Directive ompDirective,
@@ -1665,7 +1665,7 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1665
1665
if (ReductionProcessor::doReductionByRef (reductionVars))
1666
1666
byrefOperand = firOpBuilder.getUnitAttr ();
1667
1667
1668
- auto wsLoopOp = firOpBuilder.create <mlir::omp::WsLoopOp >(
1668
+ auto wsLoopOp = firOpBuilder.create <mlir::omp::WsloopOp >(
1669
1669
loc, lowerBound, upperBound, step, linearVars, linearStepVars,
1670
1670
reductionVars,
1671
1671
reductionDeclSymbols.empty ()
@@ -1712,15 +1712,15 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1712
1712
reductionTypes);
1713
1713
};
1714
1714
1715
- createBodyOfOp<mlir::omp::WsLoopOp >(
1715
+ createBodyOfOp<mlir::omp::WsloopOp >(
1716
1716
wsLoopOp, OpWithBodyGenInfo (converter, semaCtx, loc, *nestedEval)
1717
1717
.setClauses (&beginClauseList)
1718
1718
.setDataSharingProcessor (&dsp)
1719
1719
.setReductions (&reductionSymbols, &reductionTypes)
1720
1720
.setGenRegionEntryCb (ivCallback));
1721
1721
}
1722
1722
1723
- static void createSimdWsLoop (
1723
+ static void createSimdWsloop (
1724
1724
Fortran::lower::AbstractConverter &converter,
1725
1725
Fortran::semantics::SemanticsContext &semaCtx,
1726
1726
Fortran::lower::pft::Evaluation &eval, llvm::omp::Directive ompDirective,
@@ -1740,7 +1740,7 @@ static void createSimdWsLoop(
1740
1740
// When support for vectorization is enabled, then we need to add handling of
1741
1741
// if clause. Currently if clause can be skipped because we always assume
1742
1742
// SIMD length = 1.
1743
- createWsLoop (converter, semaCtx, eval, ompDirective, beginClauseList,
1743
+ createWsloop (converter, semaCtx, eval, ompDirective, beginClauseList,
1744
1744
endClauseList, loc);
1745
1745
}
1746
1746
@@ -1812,7 +1812,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
1812
1812
1813
1813
if (llvm::omp::allDoSimdSet.test (ompDirective)) {
1814
1814
// 2.9.3.2 Workshare SIMD construct
1815
- createSimdWsLoop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
1815
+ createSimdWsloop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
1816
1816
endClauseList, currentLocation);
1817
1817
1818
1818
} else if (llvm::omp::allSimdSet.test (ompDirective)) {
@@ -1821,7 +1821,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
1821
1821
currentLocation);
1822
1822
genOpenMPReduction (converter, semaCtx, loopOpClauseList);
1823
1823
} else {
1824
- createWsLoop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
1824
+ createWsloop (converter, semaCtx, eval, ompDirective, loopOpClauseList,
1825
1825
endClauseList, currentLocation);
1826
1826
}
1827
1827
}
@@ -1898,15 +1898,15 @@ genOMP(Fortran::lower::AbstractConverter &converter,
1898
1898
beginClauseList, directive.v );
1899
1899
break ;
1900
1900
case llvm::omp::Directive::OMPD_target_data:
1901
- genDataOp (converter, semaCtx, eval, /* genNested=*/ true , currentLocation ,
1902
- beginClauseList);
1901
+ genTargetDataOp (converter, semaCtx, eval, /* genNested=*/ true ,
1902
+ currentLocation, beginClauseList);
1903
1903
break ;
1904
1904
case llvm::omp::Directive::OMPD_task:
1905
1905
genTaskOp (converter, semaCtx, eval, /* genNested=*/ true , currentLocation,
1906
1906
beginClauseList);
1907
1907
break ;
1908
1908
case llvm::omp::Directive::OMPD_taskgroup:
1909
- genTaskGroupOp (converter, semaCtx, eval, /* genNested=*/ true ,
1909
+ genTaskgroupOp (converter, semaCtx, eval, /* genNested=*/ true ,
1910
1910
currentLocation, beginClauseList);
1911
1911
break ;
1912
1912
case llvm::omp::Directive::OMPD_teams:
@@ -2260,7 +2260,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
2260
2260
mlir::Operation *Fortran::lower::genOpenMPTerminator (fir::FirOpBuilder &builder,
2261
2261
mlir::Operation *op,
2262
2262
mlir::Location loc) {
2263
- if (mlir::isa<mlir::omp::WsLoopOp , mlir::omp::ReductionDeclareOp ,
2263
+ if (mlir::isa<mlir::omp::WsloopOp , mlir::omp::DeclareReductionOp ,
2264
2264
mlir::omp::AtomicUpdateOp, mlir::omp::SimdLoopOp>(op))
2265
2265
return builder.create <mlir::omp::YieldOp>(loc);
2266
2266
else
0 commit comments