[flang-commits] [flang] [flang][OpenMP] Inline the firstprivate array copy instead of calling Assign() (PR #211543)
via flang-commits
flang-commits at lists.llvm.org
Fri Jul 24 06:39:28 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/HLFIR/Transforms/InlineHLFIRAssign.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/HLFIR/Transforms/InlineHLFIRAssign.cpp b/flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRAssign.cpp
index 2b753dfff..17d894a97 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRAssign.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRAssign.cpp
@@ -89,7 +89,8 @@ static bool isOmpPrivateCopyInAssign(hlfir::AssignOp assign) {
// A POINTER firstprivate copies the association, so the data aliases.
auto isPointer = [](mlir::Value v) {
- auto boxTy = mlir::dyn_cast<fir::BaseBoxType>(fir::unwrapRefType(v.getType()));
+ auto boxTy =
+ mlir::dyn_cast<fir::BaseBoxType>(fir::unwrapRefType(v.getType()));
return boxTy && boxTy.isPointer();
};
if (isPointer(mold))
``````````
</details>
https://github.com/llvm/llvm-project/pull/211543
More information about the flang-commits
mailing list