|
CIRCT 22.0.0git
|
A data structure that caches and provides paths to module instances in the IR. More...
#include <InstanceGraph.h>

Public Member Functions | |
| InstancePathCache (InstanceGraph &instanceGraph) | |
| ArrayRef< InstancePath > | getAbsolutePaths (ModuleOpInterface op) |
| ArrayRef< InstancePath > | getRelativePaths (ModuleOpInterface op, InstanceGraphNode *node) |
| void | replaceInstance (InstanceOpInterface oldOp, InstanceOpInterface newOp) |
| Replace an InstanceOp. This is required to keep the cache updated. | |
| InstancePath | appendInstance (InstancePath path, InstanceOpInterface inst) |
| Append an instance to a path. | |
| InstancePath | prependInstance (InstanceOpInterface inst, InstancePath path) |
| Prepend an instance to a path. | |
| InstancePath | concatPath (InstancePath path1, InstancePath path2) |
| Concatenate two paths. | |
Public Attributes | |
| InstanceGraph & | instanceGraph |
| The instance graph of the IR. | |
Private Types | |
| using | PathsCache = DenseMap< Operation *, ArrayRef< InstancePath > > |
Private Member Functions | |
| ArrayRef< InstancePath > | getPaths (ModuleOpInterface op, InstanceGraphNode *top, PathsCache &cache) |
Private Attributes | |
| llvm::BumpPtrAllocator | allocator |
| An allocator for individual instance paths and entire path lists. | |
| PathsCache | absolutePathsCache |
| Cached absolute instance paths. | |
| DenseMap< InstanceGraphNode *, PathsCache > | relativePathsCache |
| Cached relative instance paths. | |
A data structure that caches and provides paths to module instances in the IR.
Definition at line 381 of file InstanceGraph.h.
|
private |
Definition at line 408 of file InstanceGraph.h.
|
inlineexplicit |
Definition at line 385 of file InstanceGraph.h.
| InstancePath InstancePathCache::appendInstance | ( | InstancePath | path, |
| InstanceOpInterface | inst | ||
| ) |
Append an instance to a path.
Definition at line 330 of file InstanceGraph.cpp.
References allocator, circt::igraph::InstancePath::begin(), circt::igraph::InstancePath::end(), and circt::igraph::InstancePath::size().
Referenced by getPaths().
| InstancePath InstancePathCache::concatPath | ( | InstancePath | path1, |
| InstancePath | path2 | ||
| ) |
Concatenate two paths.
Definition at line 348 of file InstanceGraph.cpp.
References allocator, circt::igraph::InstancePath::begin(), circt::igraph::InstancePath::end(), and circt::igraph::InstancePath::size().
Referenced by circt::synth::Object::prependPaths().
| ArrayRef< InstancePath > InstancePathCache::getAbsolutePaths | ( | ModuleOpInterface | op | ) |
Definition at line 244 of file InstanceGraph.cpp.
References absolutePathsCache, getPaths(), circt::igraph::InstanceGraph::getTopLevelNode(), and instanceGraph.
Referenced by circt::firrtl::applyGCTMemTaps(), circt::firrtl::applyWiring(), and getRelativePaths().
|
private |
Definition at line 257 of file InstanceGraph.cpp.
References allocator, appendInstance(), empty, getPaths(), instanceGraph, and circt::igraph::InstanceGraphNode::uses().
Referenced by getAbsolutePaths(), getPaths(), and getRelativePaths().
| ArrayRef< InstancePath > InstancePathCache::getRelativePaths | ( | ModuleOpInterface | op, |
| InstanceGraphNode * | node | ||
| ) |
Definition at line 249 of file InstanceGraph.cpp.
References getAbsolutePaths(), getPaths(), circt::igraph::InstanceGraph::getTopLevelNode(), instanceGraph, and relativePathsCache.
Referenced by synth.LongestPathAnalysis::Impl::collectClosedPaths().
| InstancePath InstancePathCache::prependInstance | ( | InstanceOpInterface | inst, |
| InstancePath | path | ||
| ) |
Prepend an instance to a path.
Definition at line 339 of file InstanceGraph.cpp.
References allocator, circt::igraph::InstancePath::begin(), circt::igraph::InstancePath::end(), and circt::igraph::InstancePath::size().
| void InstancePathCache::replaceInstance | ( | InstanceOpInterface | oldOp, |
| InstanceOpInterface | newOp | ||
| ) |
Replace an InstanceOp. This is required to keep the cache updated.
Definition at line 357 of file InstanceGraph.cpp.
References absolutePathsCache, allocator, instanceGraph, relativePathsCache, and circt::igraph::InstanceGraph::replaceInstance().
Referenced by circt::firrtl::addPortsToModule().
|
private |
Cached absolute instance paths.
Definition at line 416 of file InstanceGraph.h.
Referenced by getAbsolutePaths(), and replaceInstance().
|
private |
An allocator for individual instance paths and entire path lists.
Definition at line 413 of file InstanceGraph.h.
Referenced by appendInstance(), concatPath(), getPaths(), prependInstance(), and replaceInstance().
| InstanceGraph& circt::igraph::InstancePathCache::instanceGraph |
The instance graph of the IR.
Definition at line 383 of file InstanceGraph.h.
Referenced by circt::firrtl::addPortsToModule(), applyBodyTypeLoweringAnno(), getAbsolutePaths(), getPaths(), getRelativePaths(), and replaceInstance().
|
private |
Cached relative instance paths.
Definition at line 419 of file InstanceGraph.h.
Referenced by getRelativePaths(), and replaceInstance().