MLIR
17.0.0git
|
This is the implementation of the MLIRContext class, using the pImpl idiom. More...
Public Member Functions | |
MLIRContextImpl (bool threadingIsEnabled) | |
~MLIRContextImpl () | |
Public Attributes | |
DebugActionManager | debugActionManager |
An action manager for use within the context. More... | |
DiagnosticEngine | diagEngine |
bool | allowUnregisteredDialects = false |
In most cases, creating operation in unregistered dialect is not desired and indicate a misconfiguration of the compiler. More... | |
bool | threadingIsEnabled = true |
Enable support for multi-threading within MLIR. More... | |
std::atomic< int > | multiThreadedExecutionContext {0} |
Track if we are currently executing in a threaded execution environment (like the pass-manager): this is only a debugging feature to help reducing the chances of data races one some context APIs. More... | |
bool | printOpOnDiagnostic = true |
If the operation should be attached to diagnostics printed via the Operation::emit methods. More... | |
bool | printStackTraceOnDiagnostic = false |
If the current stack trace should be attached when emitting diagnostics. More... | |
llvm::ThreadPool * | threadPool = nullptr |
This points to the ThreadPool used when processing MLIR tasks in parallel. More... | |
std::unique_ptr< llvm::ThreadPool > | ownedThreadPool |
In case where the thread pool is owned by the context, this ensures destruction with the context. More... | |
DenseMap< StringRef, std::unique_ptr< Dialect > > | loadedDialects |
This is a list of dialects that are created referring to this context. More... | |
DialectRegistry | dialectsRegistry |
llvm::BumpPtrAllocator | abstractDialectSymbolAllocator |
An allocator used for AbstractAttribute and AbstractType objects. More... | |
llvm::StringMap< std::unique_ptr< OperationName::Impl > > | operations |
This is a mapping from operation name to the operation info describing it. More... | |
llvm::StringMap< RegisteredOperationName > | registeredOperations |
A vector of operation info specifically for registered operations. More... | |
SmallVector< RegisteredOperationName, 0 > | sortedRegisteredOperations |
This is a sorted container of registered operations for a deterministic and efficient getRegisteredOperations implementation. More... | |
llvm::sys::SmartRWMutex< true > | operationInfoMutex |
A mutex used when accessing operation information. More... | |
StorageUniquer | affineUniquer |
DenseMap< TypeID, AbstractType * > | registeredTypes |
StorageUniquer | typeUniquer |
Float8E5M2Type | f8E5M2Ty |
Cached Type Instances. More... | |
Float8E4M3FNType | f8E4M3FNTy |
BFloat16Type | bf16Ty |
Float16Type | f16Ty |
Float32Type | f32Ty |
Float64Type | f64Ty |
Float80Type | f80Ty |
Float128Type | f128Ty |
IndexType | indexTy |
IntegerType | int1Ty |
IntegerType | int8Ty |
IntegerType | int16Ty |
IntegerType | int32Ty |
IntegerType | int64Ty |
IntegerType | int128Ty |
NoneType | noneType |
DenseMap< TypeID, AbstractAttribute * > | registeredAttributes |
StorageUniquer | attributeUniquer |
BoolAttr | falseAttr |
Cached Attribute Instances. More... | |
BoolAttr | trueAttr |
UnitAttr | unitAttr |
UnknownLoc | unknownLocAttr |
DictionaryAttr | emptyDictionaryAttr |
StringAttr | emptyStringAttr |
llvm::sys::SmartMutex< true > | dialectRefStrAttrMutex |
Map of string attributes that may reference a dialect, that are awaiting that dialect to be loaded. More... | |
DenseMap< StringRef, SmallVector< StringAttrStorage * > > | dialectReferencingStrAttrs |
This is the implementation of the MLIRContext class, using the pImpl idiom.
This class is completely private to this file, so everything is public.
Definition at line 120 of file MLIRContext.cpp.
|
inline |
Definition at line 243 of file MLIRContext.cpp.
|
inline |
Definition at line 250 of file MLIRContext.cpp.
llvm::BumpPtrAllocator mlir::MLIRContextImpl::abstractDialectSymbolAllocator |
An allocator used for AbstractAttribute and AbstractType objects.
Definition at line 180 of file MLIRContext.cpp.
StorageUniquer mlir::MLIRContextImpl::affineUniquer |
Definition at line 200 of file MLIRContext.cpp.
bool mlir::MLIRContextImpl::allowUnregisteredDialects = false |
In most cases, creating operation in unregistered dialect is not desired and indicate a misconfiguration of the compiler.
This option enables to detect such use cases
Definition at line 141 of file MLIRContext.cpp.
StorageUniquer mlir::MLIRContextImpl::attributeUniquer |
Definition at line 227 of file MLIRContext.cpp.
BFloat16Type mlir::MLIRContextImpl::bf16Ty |
Definition at line 212 of file MLIRContext.cpp.
DebugActionManager mlir::MLIRContextImpl::debugActionManager |
An action manager for use within the context.
Definition at line 127 of file MLIRContext.cpp.
Referenced by mlir::MLIRContext::getDebugActionManager().
DiagnosticEngine mlir::MLIRContextImpl::diagEngine |
Definition at line 132 of file MLIRContext.cpp.
Referenced by mlir::MLIRContext::getDiagEngine().
DenseMap<StringRef, SmallVector<StringAttrStorage *> > mlir::MLIRContextImpl::dialectReferencingStrAttrs |
Definition at line 240 of file MLIRContext.cpp.
llvm::sys::SmartMutex<true> mlir::MLIRContextImpl::dialectRefStrAttrMutex |
Map of string attributes that may reference a dialect, that are awaiting that dialect to be loaded.
Definition at line 238 of file MLIRContext.cpp.
DialectRegistry mlir::MLIRContextImpl::dialectsRegistry |
Definition at line 177 of file MLIRContext.cpp.
DictionaryAttr mlir::MLIRContextImpl::emptyDictionaryAttr |
Definition at line 233 of file MLIRContext.cpp.
StringAttr mlir::MLIRContextImpl::emptyStringAttr |
Definition at line 234 of file MLIRContext.cpp.
Float128Type mlir::MLIRContextImpl::f128Ty |
Definition at line 217 of file MLIRContext.cpp.
Float16Type mlir::MLIRContextImpl::f16Ty |
Definition at line 213 of file MLIRContext.cpp.
Float32Type mlir::MLIRContextImpl::f32Ty |
Definition at line 214 of file MLIRContext.cpp.
Float64Type mlir::MLIRContextImpl::f64Ty |
Definition at line 215 of file MLIRContext.cpp.
Float80Type mlir::MLIRContextImpl::f80Ty |
Definition at line 216 of file MLIRContext.cpp.
Float8E4M3FNType mlir::MLIRContextImpl::f8E4M3FNTy |
Definition at line 211 of file MLIRContext.cpp.
Float8E5M2Type mlir::MLIRContextImpl::f8E5M2Ty |
Cached Type Instances.
Definition at line 210 of file MLIRContext.cpp.
BoolAttr mlir::MLIRContextImpl::falseAttr |
Cached Attribute Instances.
Definition at line 230 of file MLIRContext.cpp.
Referenced by mlir::BoolAttr::get().
IndexType mlir::MLIRContextImpl::indexTy |
Definition at line 218 of file MLIRContext.cpp.
IntegerType mlir::MLIRContextImpl::int128Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
IntegerType mlir::MLIRContextImpl::int16Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
IntegerType mlir::MLIRContextImpl::int1Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
IntegerType mlir::MLIRContextImpl::int32Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
IntegerType mlir::MLIRContextImpl::int64Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
IntegerType mlir::MLIRContextImpl::int8Ty |
Definition at line 219 of file MLIRContext.cpp.
Referenced by getCachedIntegerType().
This is a list of dialects that are created referring to this context.
The MLIRContext owns the objects.
Definition at line 176 of file MLIRContext.cpp.
std::atomic<int> mlir::MLIRContextImpl::multiThreadedExecutionContext {0} |
Track if we are currently executing in a threaded execution environment (like the pass-manager): this is only a debugging feature to help reducing the chances of data races one some context APIs.
Definition at line 150 of file MLIRContext.cpp.
NoneType mlir::MLIRContextImpl::noneType |
Definition at line 220 of file MLIRContext.cpp.
llvm::sys::SmartRWMutex<true> mlir::MLIRContextImpl::operationInfoMutex |
A mutex used when accessing operation information.
Definition at line 193 of file MLIRContext.cpp.
Referenced by mlir::OperationName::OperationName().
llvm::StringMap<std::unique_ptr<OperationName::Impl> > mlir::MLIRContextImpl::operations |
This is a mapping from operation name to the operation info describing it.
Definition at line 183 of file MLIRContext.cpp.
Referenced by mlir::OperationName::OperationName().
std::unique_ptr<llvm::ThreadPool> mlir::MLIRContextImpl::ownedThreadPool |
In case where the thread pool is owned by the context, this ensures destruction with the context.
Definition at line 172 of file MLIRContext.cpp.
bool mlir::MLIRContextImpl::printOpOnDiagnostic = true |
If the operation should be attached to diagnostics printed via the Operation::emit methods.
Definition at line 155 of file MLIRContext.cpp.
bool mlir::MLIRContextImpl::printStackTraceOnDiagnostic = false |
If the current stack trace should be attached when emitting diagnostics.
Definition at line 158 of file MLIRContext.cpp.
DenseMap<TypeID, AbstractAttribute *> mlir::MLIRContextImpl::registeredAttributes |
Definition at line 226 of file MLIRContext.cpp.
llvm::StringMap<RegisteredOperationName> mlir::MLIRContextImpl::registeredOperations |
A vector of operation info specifically for registered operations.
Definition at line 186 of file MLIRContext.cpp.
Referenced by mlir::OperationName::OperationName().
DenseMap<TypeID, AbstractType *> mlir::MLIRContextImpl::registeredTypes |
Definition at line 206 of file MLIRContext.cpp.
SmallVector<RegisteredOperationName, 0> mlir::MLIRContextImpl::sortedRegisteredOperations |
This is a sorted container of registered operations for a deterministic and efficient getRegisteredOperations
implementation.
Definition at line 190 of file MLIRContext.cpp.
bool mlir::MLIRContextImpl::threadingIsEnabled = true |
Enable support for multi-threading within MLIR.
Definition at line 144 of file MLIRContext.cpp.
llvm::ThreadPool* mlir::MLIRContextImpl::threadPool = nullptr |
This points to the ThreadPool used when processing MLIR tasks in parallel.
It can't be nullptr when multi-threading is enabled. Otherwise if multi-threading is disabled, and the threadpool wasn't externally provided using setThreadPool
, this will be nullptr.
Definition at line 168 of file MLIRContext.cpp.
BoolAttr mlir::MLIRContextImpl::trueAttr |
Definition at line 230 of file MLIRContext.cpp.
Referenced by mlir::BoolAttr::get().
StorageUniquer mlir::MLIRContextImpl::typeUniquer |
Definition at line 207 of file MLIRContext.cpp.
UnitAttr mlir::MLIRContextImpl::unitAttr |
Definition at line 231 of file MLIRContext.cpp.
UnknownLoc mlir::MLIRContextImpl::unknownLocAttr |
Definition at line 232 of file MLIRContext.cpp.