[llvm-branch-commits] [flang] [Flang][OpenMP] PoC module support for allocate directives (PR #216022)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 13 05:14:24 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 cpp -- flang/lib/Lower/OpenMP/OpenMP.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/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index ead005a08..3f6c76a67 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2804,7 +2804,8 @@ static void genWsloopClauses(
 static mlir::omp::AllocateDirOp
 genAllocateDirOp(lower::AbstractConverter &converter, mlir::Location loc,
                  llvm::ArrayRef<mlir::Value> operandRange,
-                 const mlir::omp::AllocateDirOperands &clauseOps, bool genFree) {
+                 const mlir::omp::AllocateDirOperands &clauseOps,
+                 bool genFree) {
   auto allocDirOp = mlir::omp::AllocateDirOp::create(
       converter.getFirOpBuilder(), loc, operandRange, clauseOps.align,
       clauseOps.allocator);
@@ -5619,9 +5620,9 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
   List<Clause> clauses = makeClauses(clauseList, semaCtx);
   mlir::Location loc = converter.genLocation(allocate.source);
 
-  ConstructQueue queue{buildConstructQueue(
-      builder.getModule(), semaCtx, eval, allocate.source,
-      llvm::omp::Directive::OMPD_allocate, clauses)};
+  ConstructQueue queue{
+      buildConstructQueue(builder.getModule(), semaCtx, eval, allocate.source,
+                          llvm::omp::Directive::OMPD_allocate, clauses)};
   ConstructQueue::const_iterator item = queue.begin();
 
   // In a module (or submodule) declaration scope the list items are fir.global

``````````

</details>


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


More information about the llvm-branch-commits mailing list