MLIR 23.0.0git
MlirConversionPatternCallbacks Struct Reference

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.

Detailed Description

ConversionPattern API.

Definition at line 553 of file Rewrite.h.

Member Data Documentation

◆ construct

void(* MlirConversionPatternCallbacks::construct) (void *userData)

Optional constructor for the user data.

Set to nullptr to disable it.

Definition at line 556 of file Rewrite.h.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().

◆ destruct

void(* MlirConversionPatternCallbacks::destruct) (void *userData)

Optional destructor for the user data.

Set to nullptr to disable it.

Definition at line 559 of file Rewrite.h.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().

◆ matchAndRewrite

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 563 of file Rewrite.h.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::addConversion().


The documentation for this struct was generated from the following file: