CIRCT
20.0.0git
|
A data structure that caches and provides absolute paths to module instances in the IR. More...
#include <InstanceGraph.h>
Public Member Functions | |
InstancePathCache (InstanceGraph &instanceGraph) | |
ArrayRef< InstancePath > | getAbsolutePaths (ModuleOpInterface op) |
ArrayRef< InstancePath > | getAbsolutePaths (ModuleOpInterface op, InstanceGraphNode *top) |
void | replaceInstance (InstanceOpInterface oldOp, InstanceOpInterface newOp) |
Replace an InstanceOp. This is required to keep the cache updated. More... | |
InstancePath | appendInstance (InstancePath path, InstanceOpInterface inst) |
Append an instance to a path. More... | |
InstancePath | prependInstance (InstanceOpInterface inst, InstancePath path) |
Prepend an instance to a path. More... | |
Public Attributes | |
InstanceGraph & | instanceGraph |
The instance graph of the IR. More... | |
Private Attributes | |
llvm::BumpPtrAllocator | allocator |
An allocator for individual instance paths and entire path lists. More... | |
DenseMap< Operation *, ArrayRef< InstancePath > > | absolutePathsCache |
Cached absolute instance paths. More... | |
A data structure that caches and provides absolute paths to module instances in the IR.
Definition at line 329 of file InstanceGraph.h.
|
inlineexplicit |
Definition at line 333 of file InstanceGraph.h.
InstancePath InstancePathCache::appendInstance | ( | InstancePath | path, |
InstanceOpInterface | inst | ||
) |
Append an instance to a path.
Definition at line 307 of file InstanceGraph.cpp.
References circt::igraph::InstancePath::begin(), circt::igraph::InstancePath::end(), and circt::igraph::InstancePath::size().
ArrayRef< InstancePath > InstancePathCache::getAbsolutePaths | ( | ModuleOpInterface | op | ) |
Definition at line 231 of file InstanceGraph.cpp.
Referenced by circt::firrtl::applyGCTMemTaps(), circt::firrtl::applyWiring(), and lowerInternalPathAnno().
ArrayRef< InstancePath > InstancePathCache::getAbsolutePaths | ( | ModuleOpInterface | op, |
InstanceGraphNode * | top | ||
) |
Definition at line 237 of file InstanceGraph.cpp.
References empty, and circt::igraph::InstanceGraphNode::uses().
InstancePath InstancePathCache::prependInstance | ( | InstanceOpInterface | inst, |
InstancePath | path | ||
) |
Prepend an instance to a path.
Definition at line 316 of file InstanceGraph.cpp.
References 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 325 of file InstanceGraph.cpp.
Referenced by circt::firrtl::addPortsToModule().
|
private |
Cached absolute instance paths.
Definition at line 353 of file InstanceGraph.h.
|
private |
An allocator for individual instance paths and entire path lists.
Definition at line 350 of file InstanceGraph.h.
InstanceGraph& circt::igraph::InstancePathCache::instanceGraph |
The instance graph of the IR.
Definition at line 331 of file InstanceGraph.h.
Referenced by circt::firrtl::addPortsToModule(), applyBodyTypeLoweringAnno(), and lowerInternalPathAnno().