MLIR
21.0.0git
|
Classes | |
struct | ThreadDiagnostic |
Public Member Functions | |
ParallelDiagnosticHandlerImpl (MLIRContext *ctx) | |
~ParallelDiagnosticHandlerImpl () override | |
void | emitDiagnostics (llvm::function_ref< void(Diagnostic &)> emitFn) const |
Utility method to emit any held diagnostics. More... | |
void | setOrderIDForThread (size_t orderID) |
Set the order id for the current thread. More... | |
void | eraseOrderIDForThread () |
Remove the order id for the current thread. More... | |
void | print (raw_ostream &os) const override |
Dump the current diagnostics that were inflight. More... | |
Public Attributes | |
llvm::sys::SmartMutex< true > | mutex |
A smart mutex to lock access to the internal state. More... | |
DenseMap< uint64_t, size_t > | threadToOrderID |
A mapping between the thread id and the current order id. More... | |
std::vector< ThreadDiagnostic > | diagnostics |
An unordered list of diagnostics that were emitted. More... | |
DiagnosticEngine::HandlerID | handlerID = 0 |
The unique id for the parallel handler. More... | |
MLIRContext * | context |
The context to emit the diagnostics to. More... | |
Definition at line 907 of file Diagnostics.cpp.
|
inline |
Definition at line 922 of file Diagnostics.cpp.
References diag(), diagnostics, mlir::MLIRContext::getDiagEngine(), handlerID, mutex, mlir::DiagnosticEngine::registerHandler(), and threadToOrderID.
|
inlineoverride |
Definition at line 938 of file Diagnostics.cpp.
References context, diag(), diagnostics, emitDiagnostics(), mlir::DiagnosticEngine::eraseHandler(), mlir::MLIRContext::getDiagEngine(), and handlerID.
|
inline |
Utility method to emit any held diagnostics.
Definition at line 953 of file Diagnostics.cpp.
References diag(), and diagnostics.
Referenced by print(), and ~ParallelDiagnosticHandlerImpl().
|
inline |
Remove the order id for the current thread.
Definition at line 972 of file Diagnostics.cpp.
References mutex, and threadToOrderID.
|
inlineoverride |
Dump the current diagnostics that were inflight.
Definition at line 979 of file Diagnostics.cpp.
References diag(), diagnostics, and emitDiagnostics().
|
inline |
Set the order id for the current thread.
Definition at line 965 of file Diagnostics.cpp.
References mutex, and threadToOrderID.
MLIRContext* mlir::detail::ParallelDiagnosticHandlerImpl::context |
The context to emit the diagnostics to.
Definition at line 1023 of file Diagnostics.cpp.
Referenced by ~ParallelDiagnosticHandlerImpl().
|
mutable |
An unordered list of diagnostics that were emitted.
Definition at line 1017 of file Diagnostics.cpp.
Referenced by emitDiagnostics(), ParallelDiagnosticHandlerImpl(), print(), and ~ParallelDiagnosticHandlerImpl().
DiagnosticEngine::HandlerID mlir::detail::ParallelDiagnosticHandlerImpl::handlerID = 0 |
The unique id for the parallel handler.
Definition at line 1020 of file Diagnostics.cpp.
Referenced by ParallelDiagnosticHandlerImpl(), and ~ParallelDiagnosticHandlerImpl().
llvm::sys::SmartMutex<true> mlir::detail::ParallelDiagnosticHandlerImpl::mutex |
A smart mutex to lock access to the internal state.
Definition at line 1011 of file Diagnostics.cpp.
Referenced by eraseOrderIDForThread(), ParallelDiagnosticHandlerImpl(), and setOrderIDForThread().
DenseMap<uint64_t, size_t> mlir::detail::ParallelDiagnosticHandlerImpl::threadToOrderID |
A mapping between the thread id and the current order id.
Definition at line 1014 of file Diagnostics.cpp.
Referenced by eraseOrderIDForThread(), ParallelDiagnosticHandlerImpl(), and setOrderIDForThread().