[flang-commits] [flang] 705d927 - [Flang][OpenMP] Minor cosmetic changes post-PR#77758, NFC
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Mon Jan 15 06:22:30 PST 2024
Author: Krzysztof Parzyszek
Date: 2024-01-15T08:22:06-06:00
New Revision: 705d9273c5417e04dc542f0e46b90960c235c753
URL: https://github.com/llvm/llvm-project/commit/705d9273c5417e04dc542f0e46b90960c235c753
DIFF: https://github.com/llvm/llvm-project/commit/705d9273c5417e04dc542f0e46b90960c235c753.diff
LOG: [Flang][OpenMP] Minor cosmetic changes post-PR#77758, NFC
Rename `getCollapsedEval` to `getCollapsedLoopEval`, and move condition
check from `getCollapsedLoopEval` to `genNestedEvaluations` (the only
caller).
Added:
Modified:
flang/lib/Lower/OpenMP.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index 94c2c78be5be99..50a96d444b3525 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -111,9 +111,8 @@ static void gatherFuncAndVarSyms(
}
static Fortran::lower::pft::Evaluation *
-getCollapsedEval(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
- // Return the Evaluation of the innermost collapsed loop, or the current
- // evaluation, if there is nothing to collapse.
+getCollapsedLoopEval(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
+ // Return the Evaluation of the innermost collapsed loop.
if (collapseValue == 0)
return &eval;
@@ -132,7 +131,7 @@ static void genNestedEvaluations(Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &eval,
int collapseValue = 0) {
Fortran::lower::pft::Evaluation *curEval =
- getCollapsedEval(eval, collapseValue);
+ collapseValue == 0 ? &eval : getCollapsedLoopEval(eval, collapseValue);
for (Fortran::lower::pft::Evaluation &e : curEval->getNestedEvaluations())
converter.genEval(e);
More information about the flang-commits
mailing list