CIRCT  19.0.0git
Public Member Functions | Private Attributes | List of all members
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:
Collaboration graph
[legend]

Public Member Functions

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

Private Attributes

DenseMap< Operation *, AnnoTargetCachetargetCaches
 

Detailed Description

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

Definition at line 187 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 190 of file FIRRTLAnnotationHelper.h.

◆ insertOp()

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

Add a new op to the target cache.

Definition at line 224 of file FIRRTLAnnotationHelper.h.

◆ insertPort()

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

Add a new module port to the target cache.

Definition at line 216 of file FIRRTLAnnotationHelper.h.

◆ invalidate()

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

Clear the cache completely.

Definition at line 203 of file FIRRTLAnnotationHelper.h.

◆ lookup()

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

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

Definition at line 198 of file FIRRTLAnnotationHelper.h.

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 207 of file FIRRTLAnnotationHelper.h.

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

Member Data Documentation

◆ targetCaches

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

Definition at line 233 of file FIRRTLAnnotationHelper.h.


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