|
MLIR 22.0.0git
|
Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| virtual | ~PyOperationBase ()=default |
| void | print (std::optional< int64_t > largeElementsLimit, std::optional< int64_t > largeResourceLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool useNameLocAsPrefix, bool assumeVerified, nanobind::object fileObject, bool binary, bool skipRegions) |
| Implements the bound 'print' method and helps with others. | |
| void | print (PyAsmState &state, nanobind::object fileObject, bool binary) |
| nanobind::object | getAsm (bool binary, std::optional< int64_t > largeElementsLimit, std::optional< int64_t > largeResourceLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool useNameLocAsPrefix, bool assumeVerified, bool skipRegions) |
| void | writeBytecode (const nanobind::object &fileObject, std::optional< int64_t > bytecodeVersion) |
| void | walk (std::function< PyWalkResult(MlirOperation)> callback, PyWalkOrder walkOrder) |
| void | moveAfter (PyOperationBase &other) |
| Moves the operation before or after the other operation. | |
| void | moveBefore (PyOperationBase &other) |
| bool | isBeforeInBlock (PyOperationBase &other) |
| Given an operation 'other' that is within the same parent block, return whether the current operation is before 'other' in the operation list of the parent block. | |
| bool | verify () |
| Verify the operation. | |
| virtual PyOperation & | getOperation ()=0 |
| Each must provide access to the raw Operation. | |
Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it.
|
virtualdefault |
References getAsm(), isBeforeInBlock(), moveAfter(), moveBefore(), verify(), walk(), and writeBytecode().
| nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::getAsm | ( | bool | binary, |
| std::optional< int64_t > | largeElementsLimit, | ||
| std::optional< int64_t > | largeResourceLimit, | ||
| bool | enableDebugInfo, | ||
| bool | prettyDebugInfo, | ||
| bool | printGenericOpForm, | ||
| bool | useLocalScope, | ||
| bool | useNameLocAsPrefix, | ||
| bool | assumeVerified, | ||
| bool | skipRegions ) |
Definition at line 1135 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
|
pure virtual |
Each must provide access to the raw Operation.
Implemented in mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperation, and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpView.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populatePassManagerSubmodule(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateRewriteSubmodule().
| bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::isBeforeInBlock | ( | PyOperationBase & | other | ) |
Given an operation 'other' that is within the same parent block, return whether the current operation is before 'other' in the operation list of the parent block.
Note: This function has an average complexity of O(1), but worst case may take O(N) where N is the number of operations within the parent block.
Definition at line 1181 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::moveAfter | ( | PyOperationBase & | other | ) |
Moves the operation before or after the other operation.
Definition at line 1163 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::moveBefore | ( | PyOperationBase & | other | ) |
Definition at line 1172 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::print | ( | PyAsmState & | state, |
| nanobind::object | fileObject, | ||
| bool | binary ) |
Definition at line 1070 of file IRCore.cpp.
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::print | ( | std::optional< int64_t > | largeElementsLimit, |
| std::optional< int64_t > | largeResourceLimit, | ||
| bool | enableDebugInfo, | ||
| bool | prettyDebugInfo, | ||
| bool | printGenericOpForm, | ||
| bool | useLocalScope, | ||
| bool | useNameLocAsPrefix, | ||
| bool | assumeVerified, | ||
| nanobind::object | fileObject, | ||
| bool | binary, | ||
| bool | skipRegions ) |
Implements the bound 'print' method and helps with others.
Definition at line 1033 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
| bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::verify | ( | ) |
Verify the operation.
Throws MLIRError if verification fails, and returns true otherwise.
Definition at line 1189 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::walk | ( | std::function< PyWalkResult(MlirOperation)> | callback, |
| PyWalkOrder | walkOrder ) |
Definition at line 1103 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase::writeBytecode | ( | const nanobind::object & | fileObject, |
| std::optional< int64_t > | bytecodeVersion ) |
Definition at line 1081 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore(), and ~PyOperationBase().