MLIR 23.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet Class Reference

#include "Bindings/Python/Rewrite.h"

Public Member Functions

 PyRewritePatternSet (MlirContext ctx)
 Create an owned pattern set.
 PyRewritePatternSet (MlirRewritePatternSet patterns)
 Create a non-owning reference to an existing pattern set.
 ~PyRewritePatternSet ()
MlirRewritePatternSet get () const
bool isOwned () const
void add (nanobind::handle root, const nanobind::callable &matchAndRewrite, unsigned benefit)
 Add a new rewrite pattern to the pattern set.
void addConversion (nanobind::handle root, const nanobind::callable &matchAndRewrite, PyTypeConverter &typeConverter, unsigned benefit)
 Add a new conversion pattern to the pattern set.

Static Public Member Functions

static void bind (nanobind::module_ &m)

Detailed Description

Definition at line 83 of file Rewrite.h.

Constructor & Destructor Documentation

◆ PyRewritePatternSet() [1/2]

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::PyRewritePatternSet ( MlirContext ctx)

Create an owned pattern set.

Definition at line 72 of file Rewrite.cpp.

References mlirRewritePatternSetCreate(), and true.

Referenced by bind().

◆ PyRewritePatternSet() [2/2]

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::PyRewritePatternSet ( MlirRewritePatternSet patterns)

Create a non-owning reference to an existing pattern set.

Definition at line 75 of file Rewrite.cpp.

References false.

◆ ~PyRewritePatternSet()

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::~PyRewritePatternSet ( )

Definition at line 78 of file Rewrite.cpp.

References mlirRewritePatternSetDestroy().

Member Function Documentation

◆ add()

◆ addConversion()

◆ bind()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::bind ( nanobind::module_ & m)
static

◆ get()

MlirRewritePatternSet mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::get ( ) const

Definition at line 83 of file Rewrite.cpp.

◆ isOwned()

bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRewritePatternSet::isOwned ( ) const

Definition at line 85 of file Rewrite.cpp.


The documentation for this class was generated from the following files: