CIRCT  19.0.0git
Public Member Functions | Private Member Functions | Private Attributes | List of all members
circt::firrtl::AnnoTargetCache Struct Reference

Cache AnnoTargets for a module's named things. More...

#include <FIRRTLAnnotationHelper.h>

Collaboration diagram for circt::firrtl::AnnoTargetCache:
Collaboration graph
[legend]

Public Member Functions

 AnnoTargetCache ()=delete
 
 AnnoTargetCache (const AnnoTargetCache &other)=default
 
 AnnoTargetCache (AnnoTargetCache &&other)
 
 AnnoTargetCache (FModuleLike mod)
 
AnnoTarget getTargetForName (StringRef name) const
 Lookup the target for 'name', empty if not found. More...
 
void insertOp (Operation *op)
 
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...
 

Private Member Functions

void gatherTargets (FModuleLike mod)
 Walk the module and add named things to 'targets'. More...
 

Private Attributes

llvm::DenseMap< StringRef, AnnoTargettargets
 

Detailed Description

Cache AnnoTargets for a module's named things.

Definition at line 140 of file FIRRTLAnnotationHelper.h.

Constructor & Destructor Documentation

◆ AnnoTargetCache() [1/4]

circt::firrtl::AnnoTargetCache::AnnoTargetCache ( )
delete

◆ AnnoTargetCache() [2/4]

circt::firrtl::AnnoTargetCache::AnnoTargetCache ( const AnnoTargetCache other)
default

◆ AnnoTargetCache() [3/4]

circt::firrtl::AnnoTargetCache::AnnoTargetCache ( AnnoTargetCache &&  other)
inline

Definition at line 143 of file FIRRTLAnnotationHelper.h.

◆ AnnoTargetCache() [4/4]

circt::firrtl::AnnoTargetCache::AnnoTargetCache ( FModuleLike  mod)
inline

Definition at line 146 of file FIRRTLAnnotationHelper.h.

References gatherTargets().

Member Function Documentation

◆ gatherTargets()

void AnnoTargetCache::gatherTargets ( FModuleLike  mod)
private

Walk the module and add named things to 'targets'.

Definition at line 381 of file FIRRTLAnnotationHelper.cpp.

Referenced by AnnoTargetCache().

◆ getTargetForName()

AnnoTarget circt::firrtl::AnnoTargetCache::getTargetForName ( StringRef  name) const
inline

Lookup the target for 'name', empty if not found.

(check for validity using operator bool()).

Definition at line 150 of file FIRRTLAnnotationHelper.h.

References targets.

◆ insertOp()

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

Definition at line 154 of file FIRRTLAnnotationHelper.h.

References targets.

◆ insertPort()

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

Add a new module port to the target cache.

Definition at line 175 of file FIRRTLAnnotationHelper.h.

◆ replaceOp()

void circt::firrtl::AnnoTargetCache::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 167 of file FIRRTLAnnotationHelper.h.

Member Data Documentation

◆ targets

llvm::DenseMap<StringRef, AnnoTarget> circt::firrtl::AnnoTargetCache::targets
private

Definition at line 183 of file FIRRTLAnnotationHelper.h.

Referenced by getTargetForName(), and insertOp().


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