[flang-commits] [flang] [mlir] [mlir][OpenMP] - MLIR to LLVMIR translation support for delayed privatization of allocatables in `omp.target` ops (PR #116576)

via flang-commits flang-commits at lists.llvm.org
Sun Nov 17 21:45:23 PST 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 686a291cdc909e9ab7c8659aa1cab82d0182d0d2 9e83dcf1a6281a064b0b469bf42f2566362afdc1 --extensions cpp -- flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 2f0e4eb0b0..6fda19eadd 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -3991,11 +3991,11 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
                    omp::DataSharingClauseType::FirstPrivate &&
                "unsupported privatizer");
         Region &allocRegion = privatizer.getAllocRegion();
-          BlockArgument allocRegionArg = allocRegion.getArgument(0);
-          moduleTranslation.mapValue(
-              allocRegionArg,
-              findHostAssociatedValue(privVar, targetOp, mappedPrivateVars,
-                                      builder, moduleTranslation));
+        BlockArgument allocRegionArg = allocRegion.getArgument(0);
+        moduleTranslation.mapValue(
+            allocRegionArg,
+            findHostAssociatedValue(privVar, targetOp, mappedPrivateVars,
+                                    builder, moduleTranslation));
         SmallVector<llvm::Value *, 1> yieldedValues;
         if (failed(inlineConvertOmpRegions(
                 allocRegion, "omp.targetop.privatizer", builder,

``````````

</details>


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


More information about the flang-commits mailing list