|
| OpConversionPattern (MLIRContext *context, PatternBenefit benefit=1) |
|
void | rewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const final |
|
void | rewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const final |
|
PatternMatchResult | matchAndRewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const final |
| Hook for derived classes to implement combined matching and rewriting. More...
|
|
PatternMatchResult | matchAndRewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const final |
| Hook for derived classes to implement combined matching and rewriting. More...
|
|
virtual void | rewrite (SourceOp op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const |
|
virtual void | rewrite (SourceOp op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const |
|
virtual PatternMatchResult | matchAndRewrite (SourceOp op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const |
|
virtual PatternMatchResult | matchAndRewrite (SourceOp op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const |
|
| ConversionPattern (StringRef rootName, PatternBenefit benefit, MLIRContext *ctx) |
|
PatternMatchResult | matchAndRewrite (Operation *op, PatternRewriter &rewriter) const final |
| Attempt to match and rewrite the IR root at the specified operation. More...
|
|
virtual void | rewrite (Operation *op, std::unique_ptr< PatternState > state, PatternRewriter &rewriter) const |
|
virtual void | rewrite (Operation *op, PatternRewriter &rewriter) const |
|
PatternMatchResult | match (Operation *op) const override |
|
ArrayRef< OperationName > | getGeneratedOps () const |
|
PatternBenefit | getBenefit () const |
|
OperationName | getRootKind () const |
|
virtual | ~Pattern () |
|
PatternMatchResult | matchSuccess (std::unique_ptr< PatternState > state={}) const |
| This method indicates that a match was found and has the specified cost. More...
|
|
template<typename SourceOp>
struct mlir::OpConversionPattern< SourceOp >
OpConversionPattern is a wrapper around ConversionPattern that allows for matching and rewriting against an instance of a derived operation class as opposed to a raw Operation.
template<typename SourceOp >
Hook for derived classes to implement rewriting. op
is the (first) operation matched by the pattern, properOperands
is a list of rewritten values that are passed to the operation itself, destinations
is a list of (potentially rewritten) successor blocks, operands
is a list of lists of rewritten values passed to each of the successors, co-indexed with destinations
, rewriter
can be used to emit the new operations. It must be reimplemented if the ConversionPattern ever needs to replace a terminator operation that has successors. This function should not fail the pass. If some specific cases of the operation are not supported, these cases should not be matched.
Reimplemented from mlir::ConversionPattern.