MLIR
21.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 "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include <system_error>
#include <utility>
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... | |
Functions | |
template<class Func , typename... Args> | |
nb::object | classmethod (Func f, Args... args) |
Helper for creating an @classmethod. More... | |
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. More... | |
static void | maybeInsertOperation (PyOperationRef &op, const nb::object &maybeIp) |
template<typename Container > | |
static std::vector< MlirType > | getValueTypes (Container &container, PyMlirContextRef &context) |
Returns the list of types of the values held by container. More... | |
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 | kContextParseTypeDocstring [] |
static const char | kContextGetCallSiteLocationDocstring [] |
static const char | kContextGetFileLocationDocstring [] |
static const char | kContextGetFileRangeDocstring [] |
static const char | kContextGetFusedLocationDocstring [] |
static const char | kContextGetNameLocationDocString [] |
static const char | kModuleParseDocstring [] |
static const char | kOperationCreateDocstring [] |
static const char | kOperationPrintDocstring [] |
static const char | kOperationPrintStateDocstring [] |
static const char | kOperationGetAsmDocstring [] |
static const char | kOperationPrintBytecodeDocstring [] |
static const char | kOperationStrDunderDocstring [] |
static const char | kDumpDocstring [] |
static const char | kAppendBlockDocstring [] |
static const char | kValueDunderStrDocstring [] |
static const char | kGetNameAsOperand [] |
static const char | kValueReplaceAllUsesWithDocstring [] |
static const char | kValueReplaceAllUsesExceptDocstring [] |
nb::object classmethod | ( | Func | f, |
Args... | args | ||
) |
Helper for creating an @classmethod.
Definition at line 198 of file IRCore.cpp.
|
static |
Create a block, using the current location context if no locations are specified.
Definition at line 230 of file IRCore.cpp.
References mlirBlockCreate().
Referenced by mlirRewriterBaseCreateBlockBefore().
|
static |
Definition at line 204 of file IRCore.cpp.
References mlir::get().
|
static |
Definition at line 1900 of file IRCore.cpp.
References mlir::python::PyValue::get(), mlir::python::PyOperation::get(), PyOpResultList::getOperation(), mlir::python::PyOperationBase::getOperation(), and getUniqueResult().
Referenced by mlir::python::PyOpView::buildGeneric().
|
static |
Definition at line 1885 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 1725 of file IRCore.cpp.
References mlirValueGetType().
Referenced by PyOpResultList::bindDerived().
|
static |
Definition at line 1491 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().
|
static |
Definition at line 1788 of file IRCore.cpp.
References mlir::detail::enumerate().
Referenced by mlir::python::PyOpView::buildGeneric().
|
static |
Definition at line 224 of file IRCore.cpp.
References mlirStringRefCreate().
|
static |
Definition at line 216 of file IRCore.cpp.
References mlirStringRefCreate().
Referenced by 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 220 of file IRCore.cpp.
References mlirStringRefCreate().
|
static |
Definition at line 162 of file IRCore.cpp.
|
static |
Definition at line 50 of file IRCore.cpp.
|
static |
Definition at line 53 of file IRCore.cpp.
|
static |
Definition at line 56 of file IRCore.cpp.
|
static |
Definition at line 59 of file IRCore.cpp.
|
static |
Definition at line 62 of file IRCore.cpp.
|
static |
Definition at line 42 of file IRCore.cpp.
|
static |
Definition at line 159 of file IRCore.cpp.
|
static |
Definition at line 177 of file IRCore.cpp.
|
static |
Definition at line 65 of file IRCore.cpp.
|
static |
Definition at line 73 of file IRCore.cpp.
|
static |
Definition at line 128 of file IRCore.cpp.
|
static |
Definition at line 141 of file IRCore.cpp.
|
static |
Definition at line 92 of file IRCore.cpp.
|
static |
Definition at line 119 of file IRCore.cpp.
|
static |
Definition at line 151 of file IRCore.cpp.
|
static |
Definition at line 169 of file IRCore.cpp.
|
static |
Definition at line 186 of file IRCore.cpp.
|
static |
Definition at line 181 of file IRCore.cpp.