CIRCT  18.0.0git
Public Member Functions | Public Attributes | Private Attributes | List of all members
circt::igraph::InstancePathCache Struct Reference

A data structure that caches and provides absolute paths to module instances in the IR. More...

#include <InstanceGraph.h>

Collaboration diagram for circt::igraph::InstancePathCache:
Collaboration graph
[legend]

Public Member Functions

 InstancePathCache (InstanceGraph &instanceGraph)
 
ArrayRef< InstancePathgetAbsolutePaths (ModuleOpInterface op)
 
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

InstanceGraphinstanceGraph
 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...
 

Detailed Description

A data structure that caches and provides absolute paths to module instances in the IR.

Definition at line 335 of file InstanceGraph.h.

Constructor & Destructor Documentation

◆ InstancePathCache()

circt::igraph::InstancePathCache::InstancePathCache ( InstanceGraph instanceGraph)
inlineexplicit

Definition at line 339 of file InstanceGraph.h.

Member Function Documentation

◆ appendInstance()

InstancePath InstancePathCache::appendInstance ( InstancePath  path,
InstanceOpInterface  inst 
)

◆ getAbsolutePaths()

ArrayRef< InstancePath > InstancePathCache::getAbsolutePaths ( ModuleOpInterface  op)

◆ prependInstance()

InstancePath InstancePathCache::prependInstance ( InstanceOpInterface  inst,
InstancePath  path 
)

◆ replaceInstance()

void InstancePathCache::replaceInstance ( InstanceOpInterface  oldOp,
InstanceOpInterface  newOp 
)

Replace an InstanceOp. This is required to keep the cache updated.

Definition at line 287 of file InstanceGraph.cpp.

Referenced by circt::firrtl::addPortsToModule().

Member Data Documentation

◆ absolutePathsCache

DenseMap<Operation *, ArrayRef<InstancePath> > circt::igraph::InstancePathCache::absolutePathsCache
private

Cached absolute instance paths.

Definition at line 357 of file InstanceGraph.h.

◆ allocator

llvm::BumpPtrAllocator circt::igraph::InstancePathCache::allocator
private

An allocator for individual instance paths and entire path lists.

Definition at line 354 of file InstanceGraph.h.

◆ instanceGraph

InstanceGraph& circt::igraph::InstancePathCache::instanceGraph

The instance graph of the IR.

Definition at line 337 of file InstanceGraph.h.

Referenced by circt::firrtl::addPortsToModule(), and lowerInternalPathAnno().


The documentation for this struct was generated from the following files: