[flang-commits] [flang] [llvm] [flang][OpenMP] Decompose compound constructs, do recursive lowering (PR #90098)

via flang-commits flang-commits at lists.llvm.org
Mon May 6 17:17:05 PDT 2024


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 89e0557e48155d7eaab2a25426f6dfc9493f2474 6e46269fc0ae0530c3e85a626e3e2c0804d44bec -- flang/lib/Lower/OpenMP/Decomposer.cpp flang/lib/Lower/OpenMP/Decomposer.h llvm/include/llvm/Frontend/OpenMP/ConstructCompositionT.h llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h llvm/unittests/Frontend/OpenMPDecompositionTest.cpp flang/lib/Lower/OpenMP/ClauseProcessor.cpp flang/lib/Lower/OpenMP/Clauses.cpp flang/lib/Lower/OpenMP/Clauses.h flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Lower/OpenMP/Utils.cpp flang/lib/Lower/OpenMP/Utils.h llvm/include/llvm/Frontend/OpenMP/ClauseT.h
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Lower/OpenMP/Clauses.cpp b/flang/lib/Lower/OpenMP/Clauses.cpp
index 7257f9dee7..87370c9296 100644
--- a/flang/lib/Lower/OpenMP/Clauses.cpp
+++ b/flang/lib/Lower/OpenMP/Clauses.cpp
@@ -1234,9 +1234,8 @@ bool transferLocations(const List<Clause> &from, List<Clause> &to) {
   for (Clause &clause : to) {
     if (!clause.source.empty())
       continue;
-    auto found = llvm::find_if(from, [&](const Clause &c) {
-      return c.id == clause.id;
-    });
+    auto found =
+        llvm::find_if(from, [&](const Clause &c) { return c.id == clause.id; });
     // This is not completely accurate, but should be good enough for now.
     // It can be improved in the future if necessary, but in cases of
     // synthesized clauses getting accurate location may be impossible.
diff --git a/flang/lib/Lower/OpenMP/Clauses.h b/flang/lib/Lower/OpenMP/Clauses.h
index 61c8fd2d1e..4075793192 100644
--- a/flang/lib/Lower/OpenMP/Clauses.h
+++ b/flang/lib/Lower/OpenMP/Clauses.h
@@ -35,7 +35,8 @@ struct TypeTy : public evaluate::SomeType {
 using IdTy = semantics::Symbol *;
 using ExprTy = SomeExpr;
 
-template <typename T> using List = tomp::ListT<T>;
+template <typename T>
+using List = tomp::ListT<T>;
 } // namespace Fortran::lower::omp
 
 namespace tomp::type {

``````````

</details>


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


More information about the flang-commits mailing list