Skip to content

Commit 20f4a5a

Browse files
authored
[flang][openacc][NFC] Clean up lowering api (#65678)
Remove unused argument `pft::Evaluation` from higher level lowering API.
1 parent d5c6bd1 commit 20f4a5a

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

flang/include/flang/Lower/OpenACC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void genOpenACCConstruct(AbstractConverter &,
6868
pft::Evaluation &, const parser::OpenACCConstruct &);
6969
void genOpenACCDeclarativeConstruct(AbstractConverter &,
7070
Fortran::semantics::SemanticsContext &,
71-
StatementContext &, pft::Evaluation &,
71+
StatementContext &,
7272
const parser::OpenACCDeclarativeConstruct &,
7373
AccRoutineInfoMappingList &);
7474

flang/lib/Lower/Bridge.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,8 +2293,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
22932293

22942294
void genFIR(const Fortran::parser::OpenACCDeclarativeConstruct &accDecl) {
22952295
genOpenACCDeclarativeConstruct(*this, bridge.getSemanticsContext(),
2296-
bridge.fctCtx(), getEval(), accDecl,
2297-
accRoutineInfos);
2296+
bridge.fctCtx(), accDecl, accRoutineInfos);
22982297
for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations())
22992298
genFIR(e);
23002299
}

flang/lib/Lower/OpenACC.cpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,6 @@ createLoopOp(Fortran::lower::AbstractConverter &converter,
15021502

15031503
static void genACC(Fortran::lower::AbstractConverter &converter,
15041504
Fortran::semantics::SemanticsContext &semanticsContext,
1505-
Fortran::lower::pft::Evaluation &eval,
15061505
const Fortran::parser::OpenACCLoopConstruct &loopConstruct) {
15071506

15081507
const auto &beginLoopDirective =
@@ -2028,7 +2027,6 @@ genACCHostDataOp(Fortran::lower::AbstractConverter &converter,
20282027
static void
20292028
genACC(Fortran::lower::AbstractConverter &converter,
20302029
Fortran::semantics::SemanticsContext &semanticsContext,
2031-
Fortran::lower::pft::Evaluation &eval,
20322030
const Fortran::parser::OpenACCBlockConstruct &blockConstruct) {
20332031
const auto &beginBlockDirective =
20342032
std::get<Fortran::parser::AccBeginBlockDirective>(blockConstruct.t);
@@ -2061,7 +2059,6 @@ genACC(Fortran::lower::AbstractConverter &converter,
20612059
static void
20622060
genACC(Fortran::lower::AbstractConverter &converter,
20632061
Fortran::semantics::SemanticsContext &semanticsContext,
2064-
Fortran::lower::pft::Evaluation &eval,
20652062
const Fortran::parser::OpenACCCombinedConstruct &combinedConstruct) {
20662063
const auto &beginCombinedDirective =
20672064
std::get<Fortran::parser::AccBeginCombinedDirective>(combinedConstruct.t);
@@ -2457,7 +2454,6 @@ genACCUpdateOp(Fortran::lower::AbstractConverter &converter,
24572454
static void
24582455
genACC(Fortran::lower::AbstractConverter &converter,
24592456
Fortran::semantics::SemanticsContext &semanticsContext,
2460-
Fortran::lower::pft::Evaluation &eval,
24612457
const Fortran::parser::OpenACCStandaloneConstruct &standaloneConstruct) {
24622458
const auto &standaloneDirective =
24632459
std::get<Fortran::parser::AccStandaloneDirective>(standaloneConstruct.t);
@@ -2489,7 +2485,6 @@ genACC(Fortran::lower::AbstractConverter &converter,
24892485
}
24902486

24912487
static void genACC(Fortran::lower::AbstractConverter &converter,
2492-
Fortran::lower::pft::Evaluation &eval,
24932488
const Fortran::parser::OpenACCWaitConstruct &waitConstruct) {
24942489

24952490
const auto &waitArgument =
@@ -2958,7 +2953,6 @@ genDeclareInModule(Fortran::lower::AbstractConverter &converter,
29582953
static void genACC(Fortran::lower::AbstractConverter &converter,
29592954
Fortran::semantics::SemanticsContext &semanticsContext,
29602955
Fortran::lower::StatementContext &fctCtx,
2961-
Fortran::lower::pft::Evaluation &eval,
29622956
const Fortran::parser::OpenACCStandaloneDeclarativeConstruct
29632957
&declareConstruct) {
29642958

@@ -3004,7 +2998,6 @@ static void attachRoutineInfo(mlir::func::FuncOp func,
30042998
static void
30052999
genACC(Fortran::lower::AbstractConverter &converter,
30063000
Fortran::semantics::SemanticsContext &semanticsContext,
3007-
Fortran::lower::pft::Evaluation &eval,
30083001
const Fortran::parser::OpenACCRoutineConstruct &routineConstruct,
30093002
Fortran::lower::AccRoutineInfoMappingList &accRoutineInfos) {
30103003
fir::FirOpBuilder &builder = converter.getFirOpBuilder();
@@ -3111,25 +3104,25 @@ void Fortran::lower::genOpenACCConstruct(
31113104
std::visit(
31123105
common::visitors{
31133106
[&](const Fortran::parser::OpenACCBlockConstruct &blockConstruct) {
3114-
genACC(converter, semanticsContext, eval, blockConstruct);
3107+
genACC(converter, semanticsContext, blockConstruct);
31153108
},
31163109
[&](const Fortran::parser::OpenACCCombinedConstruct
31173110
&combinedConstruct) {
3118-
genACC(converter, semanticsContext, eval, combinedConstruct);
3111+
genACC(converter, semanticsContext, combinedConstruct);
31193112
},
31203113
[&](const Fortran::parser::OpenACCLoopConstruct &loopConstruct) {
3121-
genACC(converter, semanticsContext, eval, loopConstruct);
3114+
genACC(converter, semanticsContext, loopConstruct);
31223115
},
31233116
[&](const Fortran::parser::OpenACCStandaloneConstruct
31243117
&standaloneConstruct) {
3125-
genACC(converter, semanticsContext, eval, standaloneConstruct);
3118+
genACC(converter, semanticsContext, standaloneConstruct);
31263119
},
31273120
[&](const Fortran::parser::OpenACCCacheConstruct &cacheConstruct) {
31283121
TODO(converter.genLocation(cacheConstruct.source),
31293122
"OpenACC Cache construct not lowered yet!");
31303123
},
31313124
[&](const Fortran::parser::OpenACCWaitConstruct &waitConstruct) {
3132-
genACC(converter, eval, waitConstruct);
3125+
genACC(converter, waitConstruct);
31333126
},
31343127
[&](const Fortran::parser::OpenACCAtomicConstruct &atomicConstruct) {
31353128
TODO(converter.genLocation(atomicConstruct.source),
@@ -3143,20 +3136,19 @@ void Fortran::lower::genOpenACCDeclarativeConstruct(
31433136
Fortran::lower::AbstractConverter &converter,
31443137
Fortran::semantics::SemanticsContext &semanticsContext,
31453138
Fortran::lower::StatementContext &fctCtx,
3146-
Fortran::lower::pft::Evaluation &eval,
31473139
const Fortran::parser::OpenACCDeclarativeConstruct &accDeclConstruct,
31483140
Fortran::lower::AccRoutineInfoMappingList &accRoutineInfos) {
31493141

31503142
std::visit(
31513143
common::visitors{
31523144
[&](const Fortran::parser::OpenACCStandaloneDeclarativeConstruct
31533145
&standaloneDeclarativeConstruct) {
3154-
genACC(converter, semanticsContext, fctCtx, eval,
3146+
genACC(converter, semanticsContext, fctCtx,
31553147
standaloneDeclarativeConstruct);
31563148
},
31573149
[&](const Fortran::parser::OpenACCRoutineConstruct
31583150
&routineConstruct) {
3159-
genACC(converter, semanticsContext, eval, routineConstruct,
3151+
genACC(converter, semanticsContext, routineConstruct,
31603152
accRoutineInfos);
31613153
},
31623154
},

0 commit comments

Comments
 (0)