MLIR  19.0.0git
Public Member Functions | List of all members
mlir::python::PyOperationBase Class Referenceabstract

Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it. More...

#include "Bindings/Python/IRModule.h"

+ Inheritance diagram for mlir::python::PyOperationBase:

Public Member Functions

virtual ~PyOperationBase ()=default
 
void print (std::optional< int64_t > largeElementsLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool assumeVerified, py::object fileObject, bool binary)
 Implements the bound 'print' method and helps with others. More...
 
void print (PyAsmState &state, py::object fileObject, bool binary)
 
pybind11::object getAsm (bool binary, std::optional< int64_t > largeElementsLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool assumeVerified)
 
void writeBytecode (const pybind11::object &fileObject, std::optional< int64_t > bytecodeVersion)
 
void walk (std::function< MlirWalkResult(MlirOperation)> callback, MlirWalkOrder walkOrder)
 
void moveAfter (PyOperationBase &other)
 Moves the operation before or after the other operation. More...
 
void moveBefore (PyOperationBase &other)
 
bool verify ()
 Verify the operation. More...
 
virtual PyOperationgetOperation ()=0
 Each must provide access to the raw Operation. More...
 

Detailed Description

Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it.

Definition at line 563 of file IRModule.h.

Constructor & Destructor Documentation

◆ ~PyOperationBase()

virtual mlir::python::PyOperationBase::~PyOperationBase ( )
virtualdefault

Member Function Documentation

◆ getAsm()

py::object PyOperationBase::getAsm ( bool  binary,
std::optional< int64_t >  largeElementsLimit,
bool  enableDebugInfo,
bool  prettyDebugInfo,
bool  printGenericOpForm,
bool  useLocalScope,
bool  assumeVerified 
)

Definition at line 1285 of file IRCore.cpp.

References print().

◆ getOperation()

virtual PyOperation& mlir::python::PyOperationBase::getOperation ( )
pure virtual

◆ moveAfter()

void PyOperationBase::moveAfter ( PyOperationBase other)

Moves the operation before or after the other operation.

Definition at line 1308 of file IRCore.cpp.

References mlir::python::PyOperation::checkValid(), getOperation(), and mlirOperationMoveAfter().

◆ moveBefore()

void PyOperationBase::moveBefore ( PyOperationBase other)

◆ print() [1/2]

void PyOperationBase::print ( PyAsmState state,
py::object  fileObject,
bool  binary 
)

Definition at line 1221 of file IRCore.cpp.

◆ print() [2/2]

void PyOperationBase::print ( std::optional< int64_t >  largeElementsLimit,
bool  enableDebugInfo,
bool  prettyDebugInfo,
bool  printGenericOpForm,
bool  useLocalScope,
bool  assumeVerified,
py::object  fileObject,
bool  binary 
)

◆ verify()

bool PyOperationBase::verify ( )

Verify the operation.

Throws MLIRError if verification fails, and returns true otherwise.

Definition at line 1326 of file IRCore.cpp.

◆ walk()

void PyOperationBase::walk ( std::function< MlirWalkResult(MlirOperation)>  callback,
MlirWalkOrder  walkOrder 
)

Definition at line 1253 of file IRCore.cpp.

References mlir::python::PyOperation::checkValid(), and getOperation().

◆ writeBytecode()

void PyOperationBase::writeBytecode ( const pybind11::object &  fileObject,
std::optional< int64_t >  bytecodeVersion 
)

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