[flang] [llvm] [mlir] [flang][mlir][OpenMP] Report Fortran names for privatized target maps (PR #228195)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 11:55:09 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/lib/Lower/Support/Utils.cpp flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp mlir/include/mlir/Target/LLVMIR/Dialect/OpenMPCommon.h mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.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/Support/Utils.cpp b/flang/lib/Lower/Support/Utils.cpp
index ca1315291..056e7a5af 100644
--- a/flang/lib/Lower/Support/Utils.cpp
+++ b/flang/lib/Lower/Support/Utils.cpp
@@ -749,7 +749,8 @@ void privatizeSymbol(
// Boxes should be passed by reference into nested regions:
auto oldIP = firOpBuilder.saveInsertionPoint();
firOpBuilder.setInsertionPointToStart(firOpBuilder.getAllocaBlock());
- // Get name so later passes (e.g. MapsForPrivatizedSymbols) can report it in offload info.
+ // Get name so later passes (e.g. MapsForPrivatizedSymbols) can report it in
+ // offload info.
mlir::Location boxLoc = mlir::NameLoc::get(
firOpBuilder.getStringAttr(sym->name().ToString()), symLoc);
auto alloca =
diff --git a/flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp b/flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp
index a831e6aba..7ce8ee315 100644
--- a/flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp
+++ b/flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp
@@ -169,8 +169,7 @@ class MapsForPrivatizedSymbolsPass
/*members=*/SmallVector<Value>{},
/*member_index=*/mlir::ArrayAttr{},
/*bounds=*/boundsOps,
- /*mapperId=*/mapperId, /*name=*/mapName,
- builder.getBoolAttr(false));
+ /*mapperId=*/mapperId, /*name=*/mapName, builder.getBoolAttr(false));
}
void addMapInfoOp(omp::TargetOp targetOp, omp::MapInfoOp mapInfoOp) {
auto argIface = llvm::cast<omp::BlockArgOpenMPOpInterface>(*targetOp);
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp
index f25793907..d85b2e5c0 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp
@@ -30,10 +30,8 @@ llvm::Constant *mlir::LLVM::createSourceLocStrFromLocation(
return builder.getOrCreateSrcLocStr(locStr, strLen);
}
-llvm::Constant *
-mlir::LLVM::createMappingInformation(Location loc,
- llvm::OpenMPIRBuilder &builder,
- StringRef mapName) {
+llvm::Constant *mlir::LLVM::createMappingInformation(
+ Location loc, llvm::OpenMPIRBuilder &builder, StringRef mapName) {
uint32_t strLen;
Location childLoc = loc;
StringRef name = mapName;
``````````
</details>
https://github.com/llvm/llvm-project/pull/228195
More information about the llvm-commits
mailing list