CIRCT
20.0.0git
|
HW-specific instance graph with a virtual entry node linking to all publicly visible modules. More...
#include <HWInstanceGraph.h>
Public Member Functions | |
InstanceGraph (Operation *operation) | |
igraph::InstanceGraphNode * | getTopLevelNode () override |
Return the entry node linking to all public modules. More... | |
igraph::InstanceGraphNode * | addHWModule (HWModuleLike module) |
Adds a module, updating links to entry. More... | |
void | erase (igraph::InstanceGraphNode *node) override |
Erases a module, updating links to entry. More... | |
Public Member Functions inherited from circt::igraph::InstanceGraph | |
InstanceGraph (Operation *parent) | |
Create a new module graph of a circuit. More... | |
InstanceGraph (const InstanceGraph &)=delete | |
virtual | ~InstanceGraph ()=default |
InstanceGraphNode * | lookup (ModuleOpInterface op) |
Look up an InstanceGraphNode for a module. More... | |
InstanceGraphNode * | lookup (StringAttr name) |
Lookup an module by name. More... | |
InstanceGraphNode * | operator[] (ModuleOpInterface op) |
Lookup an InstanceGraphNode for a module. More... | |
bool | isAncestor (ModuleOpInterface child, ModuleOpInterface parent, llvm::function_ref< bool(InstanceRecord *)> skipInstance=[](InstanceRecord *_) { return false;}) |
Check if child is instantiated by a parent. More... | |
FailureOr< llvm::ArrayRef< InstanceGraphNode * > > | getInferredTopLevelNodes () |
Get the nodes corresponding to the inferred top-level modules of a circuit. More... | |
Operation * | getParent () |
Return the parent under which all nodes are nested. More... | |
iterator | begin () |
iterator | end () |
virtual InstanceGraphNode * | addModule (ModuleOpInterface module) |
Add a newly created module to the instance graph. More... | |
virtual void | replaceInstance (InstanceOpInterface inst, InstanceOpInterface newInst) |
Replaces an instance of a module with another instance. More... | |
Private Attributes | |
igraph::InstanceGraphNode | entry |
Additional Inherited Members | |
Public Types inherited from circt::igraph::InstanceGraph | |
using | iterator = detail::AddressIterator< NodeList::iterator > |
Iterate through all modules. More... | |
Static Public Member Functions inherited from circt::igraph::InstanceGraph | |
static NodeList InstanceGraph::* | getSublistAccess (Operation *) |
Returns pointer to member of operation list. More... | |
Protected Member Functions inherited from circt::igraph::InstanceGraph | |
ModuleOpInterface | getReferencedModuleImpl (InstanceOpInterface op) |
InstanceGraphNode * | getOrAddNode (StringAttr name) |
Get the node corresponding to the module. More... | |
Protected Attributes inherited from circt::igraph::InstanceGraph | |
Operation * | parent |
The node under which all modules are nested. More... | |
NodeList | nodes |
The storage for graph nodes, with deterministic iteration. More... | |
llvm::DenseMap< Attribute, InstanceGraphNode * > | nodeMap |
This maps each operation to its graph node. More... | |
llvm::SmallVector< InstanceGraphNode * > | inferredTopLevelNodes |
A caching of the inferred top level module(s). More... | |
HW-specific instance graph with a virtual entry node linking to all publicly visible modules.
Definition at line 24 of file HWInstanceGraph.h.
InstanceGraph::InstanceGraph | ( | Operation * | operation | ) |
Definition at line 14 of file HWInstanceGraph.cpp.
References circt::igraph::InstanceGraphNode::addInstance(), entry, and circt::igraph::InstanceGraph::nodes.
igraph::InstanceGraphNode * InstanceGraph::addHWModule | ( | HWModuleLike | module | ) |
Adds a module, updating links to entry.
Definition at line 27 of file HWInstanceGraph.cpp.
References circt::igraph::InstanceGraphNode::addInstance(), circt::igraph::InstanceGraph::addModule(), and entry.
|
overridevirtual |
Erases a module, updating links to entry.
Reimplemented from circt::igraph::InstanceGraph.
Definition at line 35 of file HWInstanceGraph.cpp.
References entry, and circt::igraph::InstanceGraph::erase().
|
inlineoverridevirtual |
Return the entry node linking to all public modules.
Reimplemented from circt::igraph::InstanceGraph.
Definition at line 29 of file HWInstanceGraph.h.
References entry.
|
private |
Definition at line 39 of file HWInstanceGraph.h.
Referenced by addHWModule(), erase(), getTopLevelNode(), and InstanceGraph().