CIRCT 24.0.0git
Loading...
Searching...
No Matches
InstancePathCache Struct Reference

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

#include <InstanceGraph.h>

Collaboration diagram for InstancePathCache:

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.

Detailed Description

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

Definition at line 381 of file InstanceGraph.h.

Member Typedef Documentation

◆ PathsCache

using circt::igraph::InstancePathCache::PathsCache = DenseMap<Operation *, ArrayRef<InstancePath>>
private

Definition at line 408 of file InstanceGraph.h.

Constructor & Destructor Documentation

◆ InstancePathCache()

Definition at line 385 of file InstanceGraph.h.

Member Function Documentation

◆ appendInstance()

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

Append an instance to a path.

Definition at line 330 of file InstanceGraph.cpp.

◆ concatPath()

Concatenate two paths.

Definition at line 348 of file InstanceGraph.cpp.

◆ getAbsolutePaths()

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

Definition at line 244 of file InstanceGraph.cpp.

◆ getPaths()

ArrayRef< InstancePath > InstancePathCache::getPaths ( ModuleOpInterface op,
InstanceGraphNode * top,
PathsCache & cache )
private

Definition at line 257 of file InstanceGraph.cpp.

◆ getRelativePaths()

ArrayRef< InstancePath > InstancePathCache::getRelativePaths ( ModuleOpInterface op,
InstanceGraphNode * node )

Definition at line 249 of file InstanceGraph.cpp.

◆ prependInstance()

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

Prepend an instance to a path.

Definition at line 339 of file InstanceGraph.cpp.

◆ replaceInstance()

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.

Member Data Documentation

◆ absolutePathsCache

Cached absolute instance paths.

Definition at line 416 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 413 of file InstanceGraph.h.

◆ instanceGraph

The instance graph of the IR.

Definition at line 383 of file InstanceGraph.h.

◆ relativePathsCache

Cached relative instance paths.

Definition at line 419 of file InstanceGraph.h.


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