34 LogicalResult matchAndRewrite(ConcatOp concatOp,
36 FailureOr<SmallVector<Value>> decomposed =
37 concatOp.decomposeOperation(rewriter);
38 if (failed(decomposed)) {
40 concatOp,
"failed to get the decomposed insert slices");
42 rewriter.
replaceOp(concatOp, decomposed.value()[0]);
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
std::enable_if_t<!std::is_convertible< CallbackT, Twine >::value, LogicalResult > notifyMatchFailure(Location loc, CallbackT &&reasonCallback)
Used to notify the listener that the IR failed to be rewritten because of a match failure,...
virtual void replaceOp(Operation *op, ValueRange newValues)
Replace the results of the given (original) operation with the specified list of values (replacements...
void populateDecomposeTensorConcatPatterns(RewritePatternSet &patterns)
Populates patterns with patterns that decompose tensor.concat into tensor.empty of a tensor of the co...
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...