|
MLIR 22.0.0git
|
#include "Globals.h"#include "IRModule.h"#include "NanobindUtils.h"#include "mlir-c/Bindings/Python/Interop.h"#include "mlir-c/BuiltinAttributes.h"#include "mlir-c/Debug.h"#include "mlir-c/Diagnostics.h"#include "mlir-c/IR.h"#include "mlir-c/Support.h"#include "mlir/Bindings/Python/Nanobind.h"#include "mlir/Bindings/Python/NanobindAdaptors.h"#include "nanobind/nanobind.h"#include "nanobind/typing.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/SmallVector.h"#include <optional>Go to the source code of this file.
Classes | |
| struct | PyGlobalDebugFlag |
| Wrapper for the global LLVM debugging flag. More... | |
| struct | PyAttrBuilderMap |
| class | PyOpResult |
| Python wrapper for MlirOpResult. More... | |
| class | PyOpResultList |
| A list of operation results. More... | |
Macros | |
| #define | _Py_CAST(type, expr) |
| #define | _Py_NULL NULL |
| #define | Py_XNewRef(obj) |
| #define | Py_NewRef(obj) |
Functions | |
| template<class Func, typename... Args> | |
| static nb::object | classmethod (Func f, Args... args) |
| Helper for creating an @classmethod. | |
| static nb::object | createCustomDialectWrapper (const std::string &dialectNamespace, nb::object dialectDescriptor) |
| static MlirStringRef | toMlirStringRef (const std::string &s) |
| static MlirStringRef | toMlirStringRef (std::string_view s) |
| static MlirStringRef | toMlirStringRef (const nb::bytes &s) |
| static MlirBlock | createBlock (const nb::sequence &pyArgTypes, const std::optional< nb::sequence > &pyArgLocs) |
| Create a block, using the current location context if no locations are specified. | |
| static void | maybeInsertOperation (PyOperationRef &op, const nb::object &maybeIp) |
| template<typename Container> | |
| static std::vector< nb::typed< nb::object, PyType > > | getValueTypes (Container &container, PyMlirContextRef &context) |
| Returns the list of types of the values held by container. | |
| static void | populateResultTypes (StringRef name, nb::list resultTypeList, const nb::object &resultSegmentSpecObj, std::vector< int32_t > &resultSegmentLengths, std::vector< PyType * > &resultTypes) |
| static MlirValue | getUniqueResult (MlirOperation operation) |
| static MlirValue | getOpResultOrValue (nb::handle operand) |
Variables | |
| static const char | kModuleParseDocstring [] |
| static const char | kDumpDocstring [] |
| static const char | kValueReplaceAllUsesExceptDocstring [] |
| #define _Py_CAST | ( | type, | |
| expr ) |
Definition at line 2740 of file IRCore.cpp.
| #define _Py_NULL NULL |
Definition at line 2751 of file IRCore.cpp.
| #define Py_NewRef | ( | obj | ) |
Definition at line 2773 of file IRCore.cpp.
| #define Py_XNewRef | ( | obj | ) |
Definition at line 2764 of file IRCore.cpp.
|
static |
Helper for creating an @classmethod.
Definition at line 59 of file IRCore.cpp.
|
static |
Create a block, using the current location context if no locations are specified.
Definition at line 91 of file IRCore.cpp.
References mlirBlockCreate(), and mlir::python::DefaultingPyLocation::resolve().
Referenced by mlirRewriterBaseCreateBlockBefore().
|
static |
Definition at line 65 of file IRCore.cpp.
References mlir::python::PyGlobals::get(), and mlir::python::PyGlobals::lookupDialectClass().
|
static |
Definition at line 1724 of file IRCore.cpp.
References mlir::python::PyOperation::get(), mlir::python::PyValue::get(), mlir::python::PyOperationBase::getOperation(), PyOpResultList::getOperation(), and getUniqueResult().
Referenced by mlir::python::PyOpView::buildGeneric().
|
static |
Definition at line 1709 of file IRCore.cpp.
References mlirIdentifierStr(), mlirOperationGetName(), mlirOperationGetNumResults(), and mlirOperationGetResult().
Referenced by getOpResultOrValue().
|
static |
Returns the list of types of the values held by container.
Definition at line 1542 of file IRCore.cpp.
References mlir::python::PyMlirContext::getRef(), mlir::python::PyType::maybeDownCast(), mlirValueGetType(), and result.
Referenced by PyOpResultList::bindDerived().
|
static |
Definition at line 1294 of file IRCore.cpp.
References mlir::python::PyObjectRef< T >::get(), mlir::python::PyThreadContextEntry::getDefaultInsertionPoint(), and mlir::python::PyInsertionPoint::insert().
Referenced by mlir::python::PyOperation::clone(), and mlir::python::PyOperation::create().
|
static |
Definition at line 1612 of file IRCore.cpp.
Referenced by mlir::python::PyOpView::buildGeneric().
|
static |
Definition at line 85 of file IRCore.cpp.
References mlirStringRefCreate().
|
static |
Definition at line 77 of file IRCore.cpp.
References mlirStringRefCreate().
Referenced by mlir::python::PyStringAttribute::bindDerived(), mlir::python::PyOperation::create(), mlir::python::PyOperation::parse(), mlir::python::PyNamedAttribute::PyNamedAttribute(), mlir::python::PySymbolTable::replaceAllSymbolUses(), mlir::python::PySymbolTable::setSymbolName(), and mlir::python::PySymbolTable::setVisibility().
|
static |
Definition at line 81 of file IRCore.cpp.
References mlirStringRefCreate().
|
static |
Definition at line 44 of file IRCore.cpp.
|
static |
Definition at line 36 of file IRCore.cpp.
|
static |
Definition at line 47 of file IRCore.cpp.