LLVM 22.0.0git
|
WaitingOnGraph class template. More...
#include "llvm/ExecutionEngine/Orc/WaitingOnGraph.h"
Classes | |
struct | EmitResult |
class | SimplifyResult |
class | SuperNode |
class | SuperNodeBuilder |
Build SuperNodes from (definition-set, dependence-set) pairs. More... |
Public Types | |
enum class | ExternalState { None , Ready , Failed } |
using | ContainerId = ContainerIdT |
using | ElementId = ElementIdT |
using | ElementSet = DenseSet<ElementId> |
using | ContainerElementsMap = DenseMap<ContainerId, ElementSet> |
Public Member Functions | |
template<typename GetExternalStateFn> | |
EmitResult | emit (SimplifyResult SR, GetExternalStateFn &&GetExternalState) |
Add the given SuperNodes to the graph, returning any SuperNodes that move to the Ready or Failed states as a result. | |
std::vector< std::unique_ptr< SuperNode > > | fail (const ContainerElementsMap &Failed) |
Identify the given symbols as Failed. | |
bool | validate (raw_ostream &Log) |
Static Public Member Functions | |
static SimplifyResult | simplify (std::vector< std::unique_ptr< SuperNode > > SNs) |
Preprocess a list of SuperNodes to remove all intra-SN dependencies. |
Friends | |
class | WaitingOnGraphTest |
WaitingOnGraph class template.
This type is intended to provide efficient dependence tracking for Symbols in an ORC program.
WaitingOnGraph models a directed graph with four partitions:
Nodes are added to the graph by emit and fail operations.
The emit operation takes a bipartite local dependence graph as an argument and returns... a. the set of nodes (both existing and newly added from the local dependence graph) whose waiting-on set is the empty set, and... b. the set of newly added nodes that are found to depend on failed nodes.
The fail operation takes a set of failed nodes and returns the set of Emitted nodes that were waiting on the failed nodes.
The concrete representation adopts several approaches for efficiency:
Definition at line 81 of file WaitingOnGraph.h.
using llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerElementsMap = DenseMap<ContainerId, ElementSet> |
Definition at line 88 of file WaitingOnGraph.h.
using llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ContainerId = ContainerIdT |
Definition at line 85 of file WaitingOnGraph.h.
using llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ElementId = ElementIdT |
Definition at line 86 of file WaitingOnGraph.h.
using llvm::orc::detail::WaitingOnGraph< ContainerIdT, ElementIdT >::ElementSet = DenseSet<ElementId> |
Definition at line 87 of file WaitingOnGraph.h.
|
strong |
Enumerator | |
---|---|
None | |
Ready | |
Failed |
Definition at line 287 of file WaitingOnGraph.h.
|
inline |
Add the given SuperNodes to the graph, returning any SuperNodes that move to the Ready or Failed states as a result.
The GetExternalState function is used to represent SuperNodes that have already become Ready or Failed (since such nodes are not explicitly represented in the graph).
Definition at line 295 of file WaitingOnGraph.h.
|
inline |
Identify the given symbols as Failed.
The elements of the Failed map will not be included in the returned result, so clients should take whatever actions are needed to mark this as failed in their external representation.
Definition at line 373 of file WaitingOnGraph.h.
|
inlinestatic |
Preprocess a list of SuperNodes to remove all intra-SN dependencies.
Definition at line 260 of file WaitingOnGraph.h.
|
inline |
Definition at line 416 of file WaitingOnGraph.h.
|
friend |
Definition at line 82 of file WaitingOnGraph.h.