[Mlir-commits] [mlir] [OpenMP][OMPIRBuilder] Refactor reduction initialization logic into one util (PR #118447)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 3 01:02:38 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 46446bb2d31a7e3b2f857613b190150d41734696 b9121a832ba2bff191531e4d09a2150b56b9dee1 --extensions 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 4af218bb5f..9b520b10fd 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -1035,7 +1035,7 @@ static LogicalResult
 initReductionVars(OP op, ArrayRef<BlockArgument> reductionArgs,
                   llvm::IRBuilderBase &builder,
                   LLVM::ModuleTranslation &moduleTranslation,
-                  llvm::BasicBlock* latestAllocaBlock,
+                  llvm::BasicBlock *latestAllocaBlock,
                   SmallVectorImpl<omp::DeclareReductionOp> &reductionDecls,
                   SmallVectorImpl<llvm::Value *> &privateReductionVariables,
                   DenseMap<Value, llvm::Value *> &reductionVariableMap,
@@ -1286,8 +1286,9 @@ static LogicalResult allocAndInitializeReductionVars(
     return failure();
 
   return initReductionVars(op, reductionArgs, builder, moduleTranslation,
-                           allocaIP.getBlock(), reductionDecls, privateReductionVariables,
-                           reductionVariableMap, isByRef, deferredStores);
+                           allocaIP.getBlock(), reductionDecls,
+                           privateReductionVariables, reductionVariableMap,
+                           isByRef, deferredStores);
 }
 
 /// Allocate delayed private variables. Returns the basic block which comes

``````````

</details>


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


More information about the Mlir-commits mailing list