[mlir] Remove the PatternState class and simplify PatternMatchResult.
Summary: PatternState was a mechanism to pass state between the match and rewrite calls of a RewritePattern. With the rise of matchAndRewrite, this class is unused and unnecessary. This revision removes PatternState and simplifies PatternMatchResult to just be a LogicalResult. A future revision will replace all usages of PatternMatchResult/matchSuccess/matchFailure with LogicalResult equivalents. Differential Revision: https://reviews.llvm.org/D76202
This commit is contained in:
@@ -805,7 +805,7 @@ public:
|
||||
// multiple times.
|
||||
auto success = matchAndRewrite(insertStridedSliceOp, rewriter);
|
||||
(void)success;
|
||||
assert(success && "Unexpected failure");
|
||||
assert(succeeded(success) && "Unexpected failure");
|
||||
extractedSource = insertStridedSliceOp;
|
||||
}
|
||||
// 4. Insert the extractedSource into the res vector.
|
||||
@@ -1083,7 +1083,7 @@ public:
|
||||
// multiple times.
|
||||
auto success = matchAndRewrite(stridedSliceOp, rewriter);
|
||||
(void)success;
|
||||
assert(success && "Unexpected failure");
|
||||
assert(succeeded(success) && "Unexpected failure");
|
||||
extracted = stridedSliceOp;
|
||||
}
|
||||
res = insertOne(rewriter, loc, extracted, res, idx);
|
||||
|
||||
Reference in New Issue
Block a user