|
MLIR 24.0.0git
|
ConversionPattern API. More...
#include "mlir-c/Rewrite.h"
Public Attributes | |
| void(* | construct )(void *userData) |
| Optional constructor for the user data. | |
| void(* | destruct )(void *userData) |
| Optional destructor for the user data. | |
| MlirLogicalResult(* | matchAndRewrite )(MlirConversionPattern pattern, MlirOperation op, intptr_t nOperands, MlirValue *operands, MlirConversionPatternRewriter rewriter, void *userData) |
| The callback function to match against code rooted at the specified operation, and perform the conversion rewrite if the match is successful, corresponding to ConversionPattern::matchAndRewrite. | |
| MlirLogicalResult(* | matchAndRewrite1ToN )(MlirConversionPattern pattern, MlirOperation op, intptr_t nRanges, intptr_t *rangeSizes, intptr_t nOperands, MlirValue *operands, MlirConversionPatternRewriter rewriter, void *userData) |
| Optional callback corresponding to the 1:N ConversionPattern::matchAndRewrite(Operation *, ArrayRef<ValueRange>, ...) overload, used when one or more operands are remapped to several values (e.g. | |
ConversionPattern API.
Optional constructor for the user data.
Set to nullptr to disable it.
Definition at line 748 of file Rewrite.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().
Optional destructor for the user data.
Set to nullptr to disable it.
Definition at line 751 of file Rewrite.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().
| MlirLogicalResult(* MlirConversionPatternCallbacks::matchAndRewrite) (MlirConversionPattern pattern, MlirOperation op, intptr_t nOperands, MlirValue *operands, MlirConversionPatternRewriter rewriter, void *userData) |
The callback function to match against code rooted at the specified operation, and perform the conversion rewrite if the match is successful, corresponding to ConversionPattern::matchAndRewrite.
Definition at line 755 of file Rewrite.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().
| MlirLogicalResult(* MlirConversionPatternCallbacks::matchAndRewrite1ToN) (MlirConversionPattern pattern, MlirOperation op, intptr_t nRanges, intptr_t *rangeSizes, intptr_t nOperands, MlirValue *operands, MlirConversionPatternRewriter rewriter, void *userData) |
Optional callback corresponding to the 1:N ConversionPattern::matchAndRewrite(Operation *, ArrayRef<ValueRange>, ...) overload, used when one or more operands are remapped to several values (e.g.
under a 1:N type conversion). operands is the flat concatenation of all operand ranges; there are nRanges ranges (one per original operand) and rangeSizes[i] is the number of values in the i-th range. When this is non-null it takes precedence; when null, the driver falls back to the 1:1 matchAndRewrite above.