[flang-commits] [flang] [flang][cuda] Delay box cuf.alloc past host association captures (PR #214347)

via flang-commits flang-commits at lists.llvm.org
Wed Aug 5 14:46:45 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/Optimizer/Transforms/CUDA/CUFAllocDelay.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/Optimizer/Transforms/CUDA/CUFAllocDelay.cpp b/flang/lib/Optimizer/Transforms/CUDA/CUFAllocDelay.cpp
index ff295c4ae..1ee7f96bf 100644
--- a/flang/lib/Optimizer/Transforms/CUDA/CUFAllocDelay.cpp
+++ b/flang/lib/Optimizer/Transforms/CUDA/CUFAllocDelay.cpp
@@ -72,8 +72,7 @@ findDelayTarget(fir::DeclareOp declareOp, mlir::Block *entryBlock,
 
   auto recordRealUse = [&](mlir::Operation *user) {
     mlir::Operation *op = user;
-    while (op && op->getBlock() &&
-           op->getBlock()->getParent() != funcRegion)
+    while (op && op->getBlock() && op->getBlock()->getParent() != funcRegion)
       op = op->getParentOp();
     if (op && op->getBlock())
       uses.push_back(op);

``````````

</details>


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


More information about the flang-commits mailing list