[flang-commits] [flang] [flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region (PR #208635)

via flang-commits flang-commits at lists.llvm.org
Fri Jul 17 01:00:21 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang/include/flang/Lower/PFTBuilder.h flang/lib/Lower/Bridge.cpp flang/lib/Lower/PFTBuilder.cpp flang/lib/Lower/Runtime.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 55f410b8c..e165d883a 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -2591,7 +2591,6 @@ private:
     Fortran::lower::pft::Evaluation &eval = getEval();
     bool unstructuredContext = eval.lowerAsUnstructured();
 
-
     // If this do-loop was absorbed by a collapse clause on a parent acc.loop,
     // skip generating any loop — just lower the body.  The IV value is
     // already available from the parent acc.loop's block argument.
@@ -2696,7 +2695,8 @@ private:
       // Infinite loops are never wrappable; maybeWrapAndRecalc is a no-op here,
       // but call it for uniformity so wrapOp stays null.
       maybeWrapAndRecalc();
-      // TODO (Claude): Maybe we can absorb calls to createNextBeginBlock into mayWrapAndRecalc?
+      // TODO (Claude): Maybe we can absorb calls to createNextBeginBlock into
+      // mayWrapAndRecalc?
       headerBlock = createNextBeginBlock();
       startBlock(headerBlock);
     } else if ((whileCondition =

``````````

</details>


https://github.com/llvm/llvm-project/pull/208635


More information about the flang-commits mailing list