[Mlir-commits] [clang] [flang] [llvm] [mlir] [OpenMP][flang] Add initial support for by-ref reductions on the GPU (PR #165714)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 30 07:54:49 PDT 2025
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 -- clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp flang/lib/Lower/Support/ReductionProcessor.cpp flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.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/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index c25684afe..73089010c 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2772,7 +2772,7 @@ Expected<Function *> OpenMPIRBuilder::emitInterWarpCopyFunction(
const ReductionInfo &RI = En.value();
bool IsByRefElem = !IsByRef.empty() && IsByRef[En.index()];
unsigned RealTySize = M.getDataLayout().getTypeAllocSize(
- IsByRefElem ? RI.ByRefElementType : RI.ElementType);
+ IsByRefElem ? RI.ByRefElementType : RI.ElementType);
for (unsigned TySize = 4; TySize > 0 && RealTySize > 0; TySize /= 2) {
Type *CType = Builder.getIntNTy(TySize * 8);
``````````
</details>
https://github.com/llvm/llvm-project/pull/165714
More information about the Mlir-commits
mailing list