|
| ConversionPattern (StringRef rootName, PatternBenefit benefit, MLIRContext *ctx) |
|
virtual void | rewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const |
|
virtual void | rewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const |
|
virtual PatternMatchResult | matchAndRewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const |
| Hook for derived classes to implement combined matching and rewriting. More...
|
|
virtual PatternMatchResult | matchAndRewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const |
| Hook for derived classes to implement combined matching and rewriting. More...
|
|
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...
|
|
Base class for the conversion patterns that require type changes. Specific conversions must derive this class and implement least one rewrite
method. NOTE: These conversion patterns can only be used with the 'apply*' methods below.
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 in mlir::OpConversionPattern< SourceOp >.