Skip to content

Commit 5154a2f

Browse files
skatrakchencha3
authored andcommitted
[MLIR][OpenMP] NFC: Uniformize OpenMP ops names (llvm#85393)
This patch proposes the renaming of certain OpenMP dialect operations with the goal of improving readability and following a uniform naming convention for MLIR operations and associated classes. In particular, the following operations are renamed: - `omp.map_info` -> `omp.map.info` - `omp.target_update_data` -> `omp.target_update` - `omp.ordered_region` -> `omp.ordered.region` - `omp.cancellationpoint` -> `omp.cancellation_point` - `omp.bounds` -> `omp.map.bounds` - `omp.reduction.declare` -> `omp.declare_reduction` Also, the following MLIR operation classes have been renamed: - `omp::TaskLoopOp` -> `omp::TaskloopOp` - `omp::TaskGroupOp` -> `omp::TaskgroupOp` - `omp::DataBoundsOp` -> `omp::MapBoundsOp` - `omp::DataOp` -> `omp::TargetDataOp` - `omp::EnterDataOp` -> `omp::TargetEnterDataOp` - `omp::ExitDataOp` -> `omp::TargetExitDataOp` - `omp::UpdateDataOp` -> `omp::TargetUpdateOp` - `omp::ReductionDeclareOp` -> `omp::DeclareReductionOp` - `omp::WsLoopOp` -> `omp::WsloopOp`
1 parent 4e81f08 commit 5154a2f

File tree

112 files changed

+773
-769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+773
-769
lines changed

flang/docs/OpenMP-descriptor-management.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ the lowering to FIR/HLFIR has been performed an OpenMP dialect specific pass for
4949
mappings, with one extra per pointer member in the descriptor that is supported on top of the original
5050
descriptor map operation. These pointers members are linked to the parent descriptor by adding them to
5151
the member field of the original descriptor map operation, they are then inserted into the relevant map
52-
owning operation's (`omp.TargetOp`, `omp.DataOp` etc.) map operand list and in cases where the owning operation
53-
is `IsolatedFromAbove`, it also inserts them as `BlockArgs` to canonicalize the mappings and simplify lowering.
52+
owning operation's (`omp.TargetOp`, `omp.TargetDataOp` etc.) map operand list and in cases where the owning
53+
operation is `IsolatedFromAbove`, it also inserts them as `BlockArgs` to canonicalize the mappings and
54+
simplify lowering.
5455
5556
An example transformation by the `OMPDescriptorMapInfoGenPass`:
5657
5758
```
5859

5960
...
60-
%12 = omp.map_info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.box<!fir.ptr<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) bounds(%11) -> !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>> {name = "arg_alloc"}
61+
%12 = omp.map.info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.box<!fir.ptr<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) bounds(%11) -> !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>> {name = "arg_alloc"}
6162
...
6263
omp.target map_entries(%12 -> %arg1, %13 -> %arg2 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.ref<i32>) {
6364
^bb0(%arg1: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, %arg2: !fir.ref<i32>):
@@ -67,8 +68,8 @@ omp.target map_entries(%12 -> %arg1, %13 -> %arg2 : !fir.ref<!fir.box<!fir.ptr<!
6768

6869
...
6970
%12 = fir.box_offset %1#1 base_addr : (!fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>) -> !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>
70-
%13 = omp.map_info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.array<?xi32>) var_ptr_ptr(%12 : !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) bounds(%11) -> !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>> {name = ""}
71-
%14 = omp.map_info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.box<!fir.ptr<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) members(%13 : !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>) -> !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>> {name = "arg_alloc"}
71+
%13 = omp.map.info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.array<?xi32>) var_ptr_ptr(%12 : !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) bounds(%11) -> !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>> {name = ""}
72+
%14 = omp.map.info var_ptr(%1#1 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.box<!fir.ptr<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) members(%13 : !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>) -> !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>> {name = "arg_alloc"}
7273
...
7374
omp.target map_entries(%13 -> %arg1, %14 -> %arg2, %15 -> %arg3 : !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>, !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, !fir.ref<i32>) {
7475
^bb0(%arg1: !fir.llvm_ptr<!fir.ref<!fir.array<?xi32>>>, %arg2: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>, %arg3: !fir.ref<i32>):

flang/include/flang/Optimizer/Transforms/Passes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def CFGConversionOnFunc : CFGConversionBase<"func", "mlir::func::FuncOp"> {
169169
let constructor = "::fir::createFirToCfgOnFuncPass()";
170170
}
171171

172-
def CFGConversionOnReduction : CFGConversionBase<"reduce", "mlir::omp::ReductionDeclareOp"> {
172+
def CFGConversionOnReduction : CFGConversionBase<"reduce", "mlir::omp::DeclareReductionOp"> {
173173
let constructor = "::fir::createFirToCfgOnReductionPass()";
174174
}
175175

flang/include/flang/Tools/CLOptions.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void addCanonicalizerPassWithoutRegionSimplification(
124124
inline void addCfgConversionPass(mlir::PassManager &pm) {
125125
addNestedPassConditionally<mlir::func::FuncOp>(
126126
pm, disableCfgConversion, fir::createFirToCfgOnFuncPass);
127-
addNestedPassConditionally<mlir::omp::ReductionDeclareOp>(
127+
addNestedPassConditionally<mlir::omp::DeclareReductionOp>(
128128
pm, disableCfgConversion, fir::createFirToCfgOnReductionPass);
129129
}
130130

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,8 @@ bool ClauseProcessor::processMap(
870870

871871
Fortran::lower::AddrAndBoundsInfo info =
872872
Fortran::lower::gatherDataOperandAddrAndBounds<
873-
Fortran::parser::OmpObject, mlir::omp::DataBoundsOp,
874-
mlir::omp::DataBoundsType>(
873+
Fortran::parser::OmpObject, mlir::omp::MapBoundsOp,
874+
mlir::omp::MapBoundsType>(
875875
converter, firOpBuilder, semaCtx, stmtCtx, ompObject,
876876
clauseLocation, asFortran, bounds, treatIndexAsSection);
877877

@@ -914,8 +914,9 @@ bool ClauseProcessor::processReduction(
914914
[&](const omp::clause::Reduction &clause,
915915
const Fortran::parser::CharBlock &) {
916916
ReductionProcessor rp;
917-
rp.addReductionDecl(currentLocation, converter, clause, reductionVars,
918-
reductionDeclSymbols, reductionSymbols);
917+
rp.addDeclareReduction(currentLocation, converter, clause,
918+
reductionVars, reductionDeclSymbols,
919+
reductionSymbols);
919920
});
920921
}
921922

flang/lib/Lower/OpenMP/ClauseProcessor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ bool ClauseProcessor::processMotionClauses(
217217
std::stringstream asFortran;
218218
Fortran::lower::AddrAndBoundsInfo info =
219219
Fortran::lower::gatherDataOperandAddrAndBounds<
220-
Fortran::parser::OmpObject, mlir::omp::DataBoundsOp,
221-
mlir::omp::DataBoundsType>(
220+
Fortran::parser::OmpObject, mlir::omp::MapBoundsOp,
221+
mlir::omp::MapBoundsType>(
222222
converter, firOpBuilder, semaCtx, stmtCtx, ompObject,
223223
clauseLocation, asFortran, bounds, treatIndexAsSection);
224224

flang/lib/Lower/OpenMP/DataSharingProcessor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void DataSharingProcessor::insertLastPrivateCompare(mlir::Operation *op) {
208208
firOpBuilder.restoreInsertionPoint(unstructuredSectionsIP);
209209
}
210210
}
211-
} else if (mlir::isa<mlir::omp::WsLoopOp>(op)) {
211+
} else if (mlir::isa<mlir::omp::WsloopOp>(op)) {
212212
// Update the original variable just before exiting the worksharing
213213
// loop. Conversion as follows:
214214
//
@@ -237,8 +237,8 @@ void DataSharingProcessor::insertLastPrivateCompare(mlir::Operation *op) {
237237

238238
mlir::Value iv = op->getRegion(0).front().getArguments()[0];
239239
mlir::Value ub =
240-
mlir::dyn_cast<mlir::omp::WsLoopOp>(op).getUpperBound()[0];
241-
mlir::Value step = mlir::dyn_cast<mlir::omp::WsLoopOp>(op).getStep()[0];
240+
mlir::dyn_cast<mlir::omp::WsloopOp>(op).getUpperBound()[0];
241+
mlir::Value step = mlir::dyn_cast<mlir::omp::WsloopOp>(op).getStep()[0];
242242

243243
// v = iv + step
244244
// cmp = step < 0 ? v < ub : v > ub

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static void createBodyOfOp(Op &op, OpWithBodyGenInfo &info) {
365365

366366
// Start with privatization, so that the lowering of the nested
367367
// 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> ||
369369
std::is_same_v<Op, mlir::omp::SimdLoopOp>;
370370
bool privatize = info.clauses && !info.outerCombined;
371371

@@ -465,7 +465,7 @@ static void genBodyOfTargetDataOp(
465465
Fortran::lower::AbstractConverter &converter,
466466
Fortran::semantics::SemanticsContext &semaCtx,
467467
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,
469469
llvm::ArrayRef<mlir::Location> useDeviceLocs,
470470
llvm::ArrayRef<const Fortran::semantics::Symbol *> useDeviceSymbols,
471471
const mlir::Location &currentLocation) {
@@ -775,8 +775,8 @@ genTaskOp(Fortran::lower::AbstractConverter &converter,
775775
dependOperands, allocateOperands, allocatorOperands);
776776
}
777777

778-
static mlir::omp::TaskGroupOp
779-
genTaskGroupOp(Fortran::lower::AbstractConverter &converter,
778+
static mlir::omp::TaskgroupOp
779+
genTaskgroupOp(Fortran::lower::AbstractConverter &converter,
780780
Fortran::semantics::SemanticsContext &semaCtx,
781781
Fortran::lower::pft::Evaluation &eval, bool genNested,
782782
mlir::Location currentLocation,
@@ -786,7 +786,7 @@ genTaskGroupOp(Fortran::lower::AbstractConverter &converter,
786786
cp.processAllocate(allocatorOperands, allocateOperands);
787787
cp.processTODO<Fortran::parser::OmpClause::TaskReduction>(
788788
currentLocation, llvm::omp::Directive::OMPD_taskgroup);
789-
return genOpWithBody<mlir::omp::TaskGroupOp>(
789+
return genOpWithBody<mlir::omp::TaskgroupOp>(
790790
OpWithBodyGenInfo(converter, semaCtx, currentLocation, eval)
791791
.setGenNested(genNested)
792792
.setClauses(&clauseList),
@@ -847,12 +847,12 @@ static void promoteNonCPtrUseDevicePtrArgsToUseDeviceAddr(
847847
}
848848
}
849849

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) {
856856
Fortran::lower::StatementContext stmtCtx;
857857
mlir::Value ifClauseOperand, deviceOperand;
858858
llvm::SmallVector<mlir::Value> mapOperands, devicePtrOperands,
@@ -885,7 +885,7 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
885885
cp.processMap(currentLocation, llvm::omp::Directive::OMPD_target_data,
886886
stmtCtx, mapOperands);
887887

888-
auto dataOp = converter.getFirOpBuilder().create<mlir::omp::DataOp>(
888+
auto dataOp = converter.getFirOpBuilder().create<mlir::omp::TargetDataOp>(
889889
currentLocation, ifClauseOperand, deviceOperand, devicePtrOperands,
890890
deviceAddrOperands, mapOperands);
891891
genBodyOfTargetDataOp(converter, semaCtx, eval, genNested, dataOp,
@@ -895,11 +895,11 @@ genDataOp(Fortran::lower::AbstractConverter &converter,
895895
}
896896

897897
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) {
903903
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
904904
Fortran::lower::StatementContext stmtCtx;
905905
mlir::Value ifClauseOperand, deviceOperand;
@@ -910,13 +910,13 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
910910
clause::If::DirectiveNameModifier directiveName;
911911
// GCC 9.3.0 emits a (probably) bogus warning about an unused variable.
912912
[[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>) {
914914
directiveName = clause::If::DirectiveNameModifier::TargetEnterData;
915915
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>) {
917917
directiveName = clause::If::DirectiveNameModifier::TargetExitData;
918918
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>) {
920920
directiveName = clause::If::DirectiveNameModifier::TargetUpdate;
921921
directive = llvm::omp::Directive::OMPD_target_update;
922922
} else {
@@ -929,7 +929,7 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
929929
cp.processDepend(dependTypeOperands, dependOperands);
930930
cp.processNowait(nowaitAttr);
931931

932-
if constexpr (std::is_same_v<OpTy, mlir::omp::UpdateDataOp>) {
932+
if constexpr (std::is_same_v<OpTy, mlir::omp::TargetUpdateOp>) {
933933
cp.processMotionClauses<Fortran::parser::OmpClause::To>(stmtCtx,
934934
mapOperands);
935935
cp.processMotionClauses<Fortran::parser::OmpClause::From>(stmtCtx,
@@ -1162,15 +1162,15 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
11621162
converter.getCurrentLocation());
11631163
if (fir::unwrapRefType(info.addr.getType()).isa<fir::BaseBoxType>())
11641164
bounds =
1165-
Fortran::lower::genBoundsOpsFromBox<mlir::omp::DataBoundsOp,
1166-
mlir::omp::DataBoundsType>(
1165+
Fortran::lower::genBoundsOpsFromBox<mlir::omp::MapBoundsOp,
1166+
mlir::omp::MapBoundsType>(
11671167
converter.getFirOpBuilder(), converter.getCurrentLocation(),
11681168
converter, dataExv, info);
11691169
if (fir::unwrapRefType(info.addr.getType()).isa<fir::SequenceType>()) {
11701170
bool dataExvIsAssumedSize =
11711171
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>(
11741174
converter.getFirOpBuilder(), converter.getCurrentLocation(),
11751175
converter, dataExv, dataExvIsAssumedSize);
11761176
}
@@ -1401,19 +1401,19 @@ genOmpSimpleStandalone(Fortran::lower::AbstractConverter &converter,
14011401
firOpBuilder.create<mlir::omp::TaskyieldOp>(currentLocation);
14021402
break;
14031403
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);
14061406
break;
14071407
case llvm::omp::Directive::OMPD_target_enter_data:
1408-
genEnterExitUpdateDataOp<mlir::omp::EnterDataOp>(
1408+
genTargetEnterExitDataUpdateOp<mlir::omp::TargetEnterDataOp>(
14091409
converter, semaCtx, currentLocation, opClauseList);
14101410
break;
14111411
case llvm::omp::Directive::OMPD_target_exit_data:
1412-
genEnterExitUpdateDataOp<mlir::omp::ExitDataOp>(
1412+
genTargetEnterExitDataUpdateOp<mlir::omp::TargetExitDataOp>(
14131413
converter, semaCtx, currentLocation, opClauseList);
14141414
break;
14151415
case llvm::omp::Directive::OMPD_target_update:
1416-
genEnterExitUpdateDataOp<mlir::omp::UpdateDataOp>(
1416+
genTargetEnterExitDataUpdateOp<mlir::omp::TargetUpdateOp>(
14171417
converter, semaCtx, currentLocation, opClauseList);
14181418
break;
14191419
case llvm::omp::Directive::OMPD_ordered:
@@ -1625,7 +1625,7 @@ createSimdLoop(Fortran::lower::AbstractConverter &converter,
16251625
.setGenRegionEntryCb(ivCallback));
16261626
}
16271627

1628-
static void createWsLoop(Fortran::lower::AbstractConverter &converter,
1628+
static void createWsloop(Fortran::lower::AbstractConverter &converter,
16291629
Fortran::semantics::SemanticsContext &semaCtx,
16301630
Fortran::lower::pft::Evaluation &eval,
16311631
llvm::omp::Directive ompDirective,
@@ -1665,7 +1665,7 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
16651665
if (ReductionProcessor::doReductionByRef(reductionVars))
16661666
byrefOperand = firOpBuilder.getUnitAttr();
16671667

1668-
auto wsLoopOp = firOpBuilder.create<mlir::omp::WsLoopOp>(
1668+
auto wsLoopOp = firOpBuilder.create<mlir::omp::WsloopOp>(
16691669
loc, lowerBound, upperBound, step, linearVars, linearStepVars,
16701670
reductionVars,
16711671
reductionDeclSymbols.empty()
@@ -1712,15 +1712,15 @@ static void createWsLoop(Fortran::lower::AbstractConverter &converter,
17121712
reductionTypes);
17131713
};
17141714

1715-
createBodyOfOp<mlir::omp::WsLoopOp>(
1715+
createBodyOfOp<mlir::omp::WsloopOp>(
17161716
wsLoopOp, OpWithBodyGenInfo(converter, semaCtx, loc, *nestedEval)
17171717
.setClauses(&beginClauseList)
17181718
.setDataSharingProcessor(&dsp)
17191719
.setReductions(&reductionSymbols, &reductionTypes)
17201720
.setGenRegionEntryCb(ivCallback));
17211721
}
17221722

1723-
static void createSimdWsLoop(
1723+
static void createSimdWsloop(
17241724
Fortran::lower::AbstractConverter &converter,
17251725
Fortran::semantics::SemanticsContext &semaCtx,
17261726
Fortran::lower::pft::Evaluation &eval, llvm::omp::Directive ompDirective,
@@ -1740,7 +1740,7 @@ static void createSimdWsLoop(
17401740
// When support for vectorization is enabled, then we need to add handling of
17411741
// if clause. Currently if clause can be skipped because we always assume
17421742
// SIMD length = 1.
1743-
createWsLoop(converter, semaCtx, eval, ompDirective, beginClauseList,
1743+
createWsloop(converter, semaCtx, eval, ompDirective, beginClauseList,
17441744
endClauseList, loc);
17451745
}
17461746

@@ -1812,7 +1812,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
18121812

18131813
if (llvm::omp::allDoSimdSet.test(ompDirective)) {
18141814
// 2.9.3.2 Workshare SIMD construct
1815-
createSimdWsLoop(converter, semaCtx, eval, ompDirective, loopOpClauseList,
1815+
createSimdWsloop(converter, semaCtx, eval, ompDirective, loopOpClauseList,
18161816
endClauseList, currentLocation);
18171817

18181818
} else if (llvm::omp::allSimdSet.test(ompDirective)) {
@@ -1821,7 +1821,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
18211821
currentLocation);
18221822
genOpenMPReduction(converter, semaCtx, loopOpClauseList);
18231823
} else {
1824-
createWsLoop(converter, semaCtx, eval, ompDirective, loopOpClauseList,
1824+
createWsloop(converter, semaCtx, eval, ompDirective, loopOpClauseList,
18251825
endClauseList, currentLocation);
18261826
}
18271827
}
@@ -1898,15 +1898,15 @@ genOMP(Fortran::lower::AbstractConverter &converter,
18981898
beginClauseList, directive.v);
18991899
break;
19001900
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);
19031903
break;
19041904
case llvm::omp::Directive::OMPD_task:
19051905
genTaskOp(converter, semaCtx, eval, /*genNested=*/true, currentLocation,
19061906
beginClauseList);
19071907
break;
19081908
case llvm::omp::Directive::OMPD_taskgroup:
1909-
genTaskGroupOp(converter, semaCtx, eval, /*genNested=*/true,
1909+
genTaskgroupOp(converter, semaCtx, eval, /*genNested=*/true,
19101910
currentLocation, beginClauseList);
19111911
break;
19121912
case llvm::omp::Directive::OMPD_teams:
@@ -2260,7 +2260,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
22602260
mlir::Operation *Fortran::lower::genOpenMPTerminator(fir::FirOpBuilder &builder,
22612261
mlir::Operation *op,
22622262
mlir::Location loc) {
2263-
if (mlir::isa<mlir::omp::WsLoopOp, mlir::omp::ReductionDeclareOp,
2263+
if (mlir::isa<mlir::omp::WsloopOp, mlir::omp::DeclareReductionOp,
22642264
mlir::omp::AtomicUpdateOp, mlir::omp::SimdLoopOp>(op))
22652265
return builder.create<mlir::omp::YieldOp>(loc);
22662266
else

0 commit comments

Comments
 (0)