CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::firrtl::CircuitTargetCache Struct Reference

Cache AnnoTargets for a circuit's modules, walked as needed. More...

#include <FIRRTLAnnotationHelper.h>

Collaboration diagram for circt::firrtl::CircuitTargetCache:

Public Member Functions

const AnnoTargetCache & getOrCreateCacheFor (FModuleLike module)
 Get cache for specified module, creating it as needed.
AnnoTarget lookup (FModuleLike module, StringRef name)
 Lookup the target for 'name' in 'module'.
void invalidate ()
 Clear the cache completely.
void replaceOp (Operation *oldOp, Operation *newOp)
 Replace oldOp with newOp in the target cache.
void insertPort (FModuleLike mod, size_t portNo)
 Add a new module port to the target cache.
void insertOp (Operation *op)
 Add a new op to the target cache.

Private Attributes

DenseMap< Operation *, AnnoTargetCache > targetCaches

Detailed Description

Cache AnnoTargets for a circuit's modules, walked as needed.

Definition at line 194 of file FIRRTLAnnotationHelper.h.

Member Function Documentation

◆ getOrCreateCacheFor()

const AnnoTargetCache & circt::firrtl::CircuitTargetCache::getOrCreateCacheFor ( FModuleLike module)
inline

Get cache for specified module, creating it as needed.

Returned reference may become invalidated by future calls.

Definition at line 197 of file FIRRTLAnnotationHelper.h.

References targetCaches.

Referenced by lookup().

◆ insertOp()

void circt::firrtl::CircuitTargetCache::insertOp ( Operation * op)
inline

Add a new op to the target cache.

Definition at line 231 of file FIRRTLAnnotationHelper.h.

References targetCaches.

◆ insertPort()

void circt::firrtl::CircuitTargetCache::insertPort ( FModuleLike mod,
size_t portNo )
inline

Add a new module port to the target cache.

Definition at line 223 of file FIRRTLAnnotationHelper.h.

References targetCaches.

◆ invalidate()

void circt::firrtl::CircuitTargetCache::invalidate ( )
inline

Clear the cache completely.

Definition at line 210 of file FIRRTLAnnotationHelper.h.

References targetCaches.

◆ lookup()

AnnoTarget circt::firrtl::CircuitTargetCache::lookup ( FModuleLike module,
StringRef name )
inline

Lookup the target for 'name' in 'module'.

Definition at line 205 of file FIRRTLAnnotationHelper.h.

References getOrCreateCacheFor(), and circt::firrtl::AnnoTargetCache::getTargetForName().

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

◆ replaceOp()

void circt::firrtl::CircuitTargetCache::replaceOp ( Operation * oldOp,
Operation * newOp )
inline

Replace oldOp with newOp in the target cache.

The new and old ops can have different names.

Definition at line 214 of file FIRRTLAnnotationHelper.h.

References targetCaches.

Member Data Documentation

◆ targetCaches

DenseMap<Operation *, AnnoTargetCache> circt::firrtl::CircuitTargetCache::targetCaches
private

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