Skip to content

Commit 705d927

Browse files
committed
[Flang][OpenMP] Minor cosmetic changes post-PR#77758, NFC
Rename `getCollapsedEval` to `getCollapsedLoopEval`, and move condition check from `getCollapsedLoopEval` to `genNestedEvaluations` (the only caller).
1 parent 3295b88 commit 705d927

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

flang/lib/Lower/OpenMP.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ static void gatherFuncAndVarSyms(
111111
}
112112

113113
static Fortran::lower::pft::Evaluation *
114-
getCollapsedEval(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
115-
// Return the Evaluation of the innermost collapsed loop, or the current
116-
// evaluation, if there is nothing to collapse.
114+
getCollapsedLoopEval(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
115+
// Return the Evaluation of the innermost collapsed loop.
117116
if (collapseValue == 0)
118117
return &eval;
119118

@@ -132,7 +131,7 @@ static void genNestedEvaluations(Fortran::lower::AbstractConverter &converter,
132131
Fortran::lower::pft::Evaluation &eval,
133132
int collapseValue = 0) {
134133
Fortran::lower::pft::Evaluation *curEval =
135-
getCollapsedEval(eval, collapseValue);
134+
collapseValue == 0 ? &eval : getCollapsedLoopEval(eval, collapseValue);
136135

137136
for (Fortran::lower::pft::Evaluation &e : curEval->getNestedEvaluations())
138137
converter.genEval(e);

0 commit comments

Comments
 (0)