[flang-commits] [flang] [llvm] [mlir] [MLIR][Flang][OpenMP] Make omp.simdloop into a loop wrapper (PR #87365)
via flang-commits
flang-commits at lists.llvm.org
Mon Apr 15 04:44:26 PDT 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 f78b3466caa9296b32ec235dee87ace2dea94507 53c0a90ede4877a12d37557c46cac111f3e15b54 -- flang/lib/Lower/OpenMP/OpenMP.cpp llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp mlir/include/mlir/Dialect/OpenMP/OpenMPClauseOperands.h mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 2f6f5e4657..a5f3818306 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -1688,12 +1688,12 @@ static void createSimd(Fortran::lower::AbstractConverter &converter,
return genLoopVars(op, converter, loc, iv);
};
- createBodyOfOp(
- *loopOp, OpWithBodyGenInfo(converter, semaCtx, loc, *nestedEval,
- OpWithBodyGenInfo::OpKind::Loop)
- .setClauses(&loopOpClauseList)
- .setDataSharingProcessor(&dsp)
- .setGenRegionEntryCb(ivCallback));
+ createBodyOfOp(*loopOp,
+ OpWithBodyGenInfo(converter, semaCtx, loc, *nestedEval,
+ OpWithBodyGenInfo::OpKind::Loop)
+ .setClauses(&loopOpClauseList)
+ .setDataSharingProcessor(&dsp)
+ .setGenRegionEntryCb(ivCallback));
}
static void createWsloop(Fortran::lower::AbstractConverter &converter,
diff --git a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
index 9d3db6ab49..a206c7b228 100644
--- a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
+++ b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
@@ -256,15 +256,14 @@ void mlir::configureOpenMPToLLVMConversionLegality(
mlir::omp::SimdOp, mlir::omp::MasterOp, mlir::omp::SectionOp,
mlir::omp::SectionsOp, mlir::omp::SingleOp, mlir::omp::TaskgroupOp,
mlir::omp::TaskOp, mlir::omp::DeclareReductionOp,
- mlir::omp::PrivateClauseOp>(
- [&](Operation *op) {
- return std::all_of(op->getRegions().begin(), op->getRegions().end(),
- [&](Region ®ion) {
- return typeConverter.isLegal(®ion);
- }) &&
- typeConverter.isLegal(op->getOperandTypes()) &&
- typeConverter.isLegal(op->getResultTypes());
- });
+ mlir::omp::PrivateClauseOp>([&](Operation *op) {
+ return std::all_of(op->getRegions().begin(), op->getRegions().end(),
+ [&](Region ®ion) {
+ return typeConverter.isLegal(®ion);
+ }) &&
+ typeConverter.isLegal(op->getOperandTypes()) &&
+ typeConverter.isLegal(op->getResultTypes());
+ });
}
void mlir::populateOpenMPToLLVMConversionPatterns(LLVMTypeConverter &converter,
``````````
</details>
https://github.com/llvm/llvm-project/pull/87365
More information about the flang-commits
mailing list