[Mlir-commits] [mlir] [mlir][PDL] Add support for native constraints with results (PR #82760)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Feb 23 05:07:45 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 27498e9942dbb8dd005588a03d6777088d2255ce ab7d42225958dab1c8745788359637e1a94a3ef1 -- mlir/include/mlir/IR/PDLPatternMatch.h.inc mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp mlir/lib/Conversion/PDLToPDLInterp/Predicate.h mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp mlir/lib/Dialect/PDL/IR/PDL.cpp mlir/lib/IR/PDL/PDLPatternMatch.cpp mlir/lib/Rewrite/ByteCode.cpp mlir/lib/Tools/PDLL/Parser/Parser.cpp mlir/test/lib/Rewrite/TestPDLByteCode.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
index d5d397eef8..a86d562fb1 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
@@ -15,10 +15,10 @@
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "llvm/ADT/MapVector.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"
#include <queue>
-#include "llvm/ADT/SmallPtrSet.h"
#define DEBUG_TYPE "pdl-predicate-tree"
@@ -893,7 +893,7 @@ void stableTopologicalSort(Iterator begin, Iterator end, Compare cmp) {
// because stable_partition will not keep the [begin, end) range intact
// while it runs.
llvm::SmallPtrSet<typename Iterator::value_type, 16> sortBeforeOthers;
- for(auto i = begin; i != end; ++i) {
+ for (auto i = begin; i != end; ++i) {
if (std::none_of(begin, end, [&](auto const &b) { return cmp(b, *i); }))
sortBeforeOthers.insert(*i);
}
diff --git a/mlir/test/lib/Rewrite/TestPDLByteCode.cpp b/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
index 73c8844ece..3fa2da106e 100644
--- a/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
+++ b/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
@@ -74,7 +74,6 @@ static LogicalResult customTypeRangeResultConstraint(PatternRewriter &rewriter,
return failure();
}
-
// Custom creator invoked from PDL.
static Operation *customCreate(PatternRewriter &rewriter, Operation *op) {
return rewriter.create(OperationState(op->getLoc(), "test.success"));
``````````
</details>
https://github.com/llvm/llvm-project/pull/82760
More information about the Mlir-commits
mailing list