|
MLIR 22.0.0git
|
Tracks an entry in the thread context stack. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Types | |
| enum class | FrameKind { Context , InsertionPoint , Location } |
Public Member Functions | |
| PyThreadContextEntry (FrameKind frameKind, nanobind::object context, nanobind::object insertionPoint, nanobind::object location) | |
| PyMlirContext * | getContext () |
| PyInsertionPoint * | getInsertionPoint () |
| PyLocation * | getLocation () |
| FrameKind | getFrameKind () |
Static Public Member Functions | |
| static PyMlirContext * | getDefaultContext () |
| Gets the top of stack context and return nullptr if not defined. | |
| static PyInsertionPoint * | getDefaultInsertionPoint () |
| Gets the top of stack insertion point and return nullptr if not defined. | |
| static PyLocation * | getDefaultLocation () |
| Gets the top of stack location and returns nullptr if not defined. | |
| static PyThreadContextEntry * | getTopOfStack () |
| Stack management. | |
| static nanobind::object | pushContext (nanobind::object context) |
| static void | popContext (PyMlirContext &context) |
| static nanobind::object | pushInsertionPoint (nanobind::object insertionPoint) |
| static void | popInsertionPoint (PyInsertionPoint &insertionPoint) |
| static nanobind::object | pushLocation (nanobind::object location) |
| static void | popLocation (PyLocation &location) |
| static std::vector< PyThreadContextEntry > & | getStack () |
| Gets the thread local stack. | |
Tracks an entry in the thread context stack.
New entries are pushed onto here for each with block that activates a new InsertionPoint, Context or Location.
Pushing either a Location or InsertionPoint also pushes its associated Context. Pushing a Context will not modify the Location or InsertionPoint unless if they are from a different context, in which case, they are cleared.
|
inline |
| PyMlirContext * mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadContextEntry::getContext | ( | ) |
Definition at line 631 of file IRCore.cpp.
|
static |
Gets the top of stack context and return nullptr if not defined.
Definition at line 649 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Gets the top of stack insertion point and return nullptr if not defined.
Definition at line 654 of file IRCore.cpp.
References getTopOfStack().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Gets the top of stack location and returns nullptr if not defined.
Definition at line 659 of file IRCore.cpp.
References getTopOfStack().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
| PyInsertionPoint * mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadContextEntry::getInsertionPoint | ( | ) |
Definition at line 637 of file IRCore.cpp.
| PyLocation * mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadContextEntry::getLocation | ( | ) |
Definition at line 643 of file IRCore.cpp.
|
static |
Gets the thread local stack.
Definition at line 597 of file IRCore.cpp.
|
static |
Stack management.
Definition at line 602 of file IRCore.cpp.
Referenced by getDefaultInsertionPoint(), getDefaultLocation(), and pushContext().
|
static |
Definition at line 671 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::attachDiagnosticHandler().
|
static |
Definition at line 694 of file IRCore.cpp.
|
static |
Definition at line 714 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::DefaultingPyLocation::resolve().
|
static |
Definition at line 664 of file IRCore.cpp.
References getTopOfStack().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::contextExit().
|
static |
Definition at line 682 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyInsertionPoint::contextExit().
|
static |
Definition at line 705 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::contextExit().