MLIR 22.0.0git
IRCore.h File Reference
#include <optional>
#include <sstream>
#include <utility>
#include <vector>
#include "Globals.h"
#include "NanobindUtils.h"
#include "mlir-c/AffineExpr.h"
#include "mlir-c/AffineMap.h"
#include "mlir-c/BuiltinAttributes.h"
#include "mlir-c/Debug.h"
#include "mlir-c/Diagnostics.h"
#include "mlir-c/IR.h"
#include "mlir-c/IntegerSet.h"
#include "mlir-c/Support.h"
#include "mlir-c/Transforms.h"
#include "mlir/Bindings/Python/Nanobind.h"
#include "mlir/Bindings/Python/NanobindAdaptors.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ThreadPool.h"

Go to the source code of this file.

Classes

struct  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyGlobalDebugFlag
 Wrapper for the global LLVM debugging flag. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyObjectRef< T >
 Template for a reference to a concrete type which captures a python reference to its underlying python object. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadContextEntry
 Tracks an entry in the thread context stack. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadPool
 Wrapper around MlirLlvmThreadPool Python object owns the C++ thread pool. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::DefaultingPyMlirContext
 Used in function arguments when None should resolve to the current context manager set instance. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject
 Base class for all objects that directly or indirectly depend on an MlirContext. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation
 Wrapper around an MlirLocation. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDiagnostic
 Python class mirroring the C MlirDiagnostic struct. More...
struct  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDiagnostic::DiagnosticInfo
 Materialized diagnostic information. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDiagnosticHandler
 Represents a diagnostic handler attached to the context. More...
struct  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::ErrorCapture
 RAII object that captures any error diagnostics emitted to the provided context. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDialectDescriptor
 Wrapper around an MlirDialect. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDialects
 User-level object for accessing dialects with dotted syntax such as: ctx.dialect.std. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDialect
 User-level dialect object. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDialectRegistry
 Wrapper around an MlirDialectRegistry. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::DefaultingPyLocation
 Used in function arguments when None should resolve to the current context manager set instance. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyModule
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase
 Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperation
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpView
 A PyOpView is equivalent to the C++ "Op" wrappers: these are the basis for providing more instance-specific accessors and serve as the base class for custom ODS-style operation classes. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRegion
 Wrapper around an MlirRegion. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAsmState
 Wrapper around an MlirAsmState. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock
 Wrapper around an MlirBlock. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyInsertionPoint
 An insertion point maintains a pointer to a Block and a reference operation. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType
 Wrapper around the generic MlirType. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeID
 A TypeID provides an efficient and unique identifier for a specific C++ type. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteType< DerivedTy, BaseTy >
 CRTP base classes for Python types that subclass Type and should be castable from it (i.e. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttribute
 Wrapper around the generic MlirAttribute. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyNamedAttribute
 Represents a Python MlirNamedAttr, carrying an optional owned name. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< DerivedTy, BaseTy >
 CRTP base classes for Python attributes that subclass Attribute and should be castable from it (i.e. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyStringAttribute
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue
 Wrapper around the generic MlirValue. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr
 Wrapper around MlirAffineExpr. Affine expressions are owned by the context. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineMap
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyIntegerSet
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolTable
 Bindings for MLIR symbol tables. More...
struct  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::MLIRError
 Custom exception that allows access to error diagnostic information. More...
struct  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttrBuilderMap
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRegionIterator
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyRegionList
 Regions of an op are fixed length and indexed numerically so are represented with a sequence-like container. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockIterator
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockList
 Blocks are exposed by the C-API as a forward-only linked list. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationIterator
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationList
 Operations are exposed by the C-API as a forward-only linked list. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpOperand
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpOperandIterator
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >
 CRTP base class for Python MLIR values that subclass Value and should be castable from it. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpResult
 Python wrapper for MlirOpResult. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpResultList
 A list of operation results. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockArgument
 Python wrapper for MlirBlockArgument. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockArgumentList
 A list of block arguments. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpOperandList
 A list of operation operands. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpSuccessors
 A list of operation successors. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockSuccessors
 A list of block successors. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockPredecessors
 A list of block predecessors. More...
class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap
 A list of operation attributes. More...
struct  nanobind::detail::type_caster< mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::DefaultingPyMlirContext >
struct  nanobind::detail::type_caster< mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::DefaultingPyLocation >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::python
namespace  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN
namespace  nanobind
namespace  nanobind::detail

Typedefs

using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContextRef = PyObjectRef<PyMlirContext>
 Wrapper around MlirContext.
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyModuleRef = PyObjectRef<PyModule>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationRef = PyObjectRef<PyOperation>

Enumerations

enum class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDiagnosticSeverity : std::underlying_type_t< MlirDiagnosticSeverity > { mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Error = MlirDiagnosticError , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Warning = MlirDiagnosticWarning , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Note = MlirDiagnosticNote , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Remark = MlirDiagnosticRemark }
enum class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyWalkResult : std::underlying_type_t< MlirWalkResult > { mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Advance = MlirWalkResultAdvance , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Interrupt = MlirWalkResultInterrupt , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::Skip = MlirWalkResultSkip }
enum class  mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyWalkOrder : std::underlying_type_t< MlirWalkOrder > { mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PreOrder = MlirWalkPreOrder , mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PostOrder = MlirWalkPostOrder }
 Traversal order for operation walk. More...

Functions

MlirStringRef mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef (const std::string &s)
MlirStringRef mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef (std::string_view s)
MlirStringRef mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef (const nanobind::bytes &s)
MlirBlock MLIR_PYTHON_API_EXPORTED mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::createBlock (const nanobind::sequence &pyArgTypes, const std::optional< nanobind::sequence > &pyArgLocs)
 Create a block, using the current location context if no locations are specified.
MLIR_PYTHON_API_EXPORTED MlirValue mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::getUniqueResult (MlirOperation operation)
MLIR_PYTHON_API_EXPORTED void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore (nanobind::module_ &m)
MLIR_PYTHON_API_EXPORTED void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateRoot (nanobind::module_ &m)