[Mlir-commits] [flang] [llvm] [mlir] [flang][OpenMP][MLIR] Add MLIR op for loop directive (PR #113911)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 28 07:08:25 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 d3f70db51cbc0876937d404e96fbda04df793bd4 b2880d832cfe0d9b4613b9bf1f431b3480327e4a --extensions h,cpp -- flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Parser/openmp-parsers.cpp mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index a420faa97a..39accbadc8 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -1958,18 +1958,17 @@ LogicalResult LoopOp::verify() {
}
LogicalResult LoopOp::verifyRegions() {
- Region& region = getRegion();
+ Region ®ion = getRegion();
- // Minimal amount of checks to verify the only nested op is an
- // `omp.loop_nest`. A more extensive vierfication is done by the
- // `LoopWrapperInterface` trait but the difference is that `omp.loop` cannot
- // have another nested `LoopWrapperInterface`.
- if (range_size(region.getOps()) != 1 ||
- !isa<LoopNestOp>(*region.op_begin()))
- return emitError() << "`omp.loop` expected to have a single nested "
- "operation which is a `omp.loop_nest`";
+ // Minimal amount of checks to verify the only nested op is an
+ // `omp.loop_nest`. A more extensive vierfication is done by the
+ // `LoopWrapperInterface` trait but the difference is that `omp.loop` cannot
+ // have another nested `LoopWrapperInterface`.
+ if (range_size(region.getOps()) != 1 || !isa<LoopNestOp>(*region.op_begin()))
+ return emitError() << "`omp.loop` expected to have a single nested "
+ "operation which is a `omp.loop_nest`";
- return success();
+ return success();
}
//===----------------------------------------------------------------------===//
``````````
</details>
https://github.com/llvm/llvm-project/pull/113911
More information about the Mlir-commits
mailing list