CIRCT 21.0.0git
|
#include <HierPathCache.h>
Public Member Functions | |
HierPathCache (Namespace *ns, OpBuilder::InsertPoint insertionPoint) | |
HierPathOp | getOrCreatePath (ArrayAttr pathArray, Location loc, StringRef nameHint="xmrPath") |
Get an existing hw::HierPathOp at the default location in the circuit. | |
HierPathOp | getOrCreatePath (ArrayAttr pathArray, Location loc, OpBuilder::InsertPoint &insertPoint, StringRef nameHint="xmrPath") |
Get an existing hw::HierPathOp at a specific location in the circuit. | |
Private Attributes | |
Namespace * | ns |
A namespace in which symbols for hierarchical path ops will be created. | |
DenseMap< mlir::Attribute, hw::HierPathOp > | pathCache |
A cache of already created HierPathOps. | |
OpBuilder::InsertPoint | pathInsertPoint |
The insertion point where the pass inserts HierPathOps. | |
Definition at line 30 of file HierPathCache.h.
|
inline |
Definition at line 32 of file HierPathCache.h.
HierPathOp circt::hw::HierPathCache::getOrCreatePath | ( | ArrayAttr | pathArray, |
Location | loc, | ||
OpBuilder::InsertPoint & | insertPoint, | ||
StringRef | nameHint = "xmrPath" |
||
) |
Get an existing hw::HierPathOp
at a specific location in the circuit.
The insertion point will be updated to allow for this method to be used repeatedly to create the ops predictably, one after the other.
Definition at line 24 of file HierPathCache.cpp.
References assert(), circt::Namespace::newName(), ns, and pathCache.
HierPathOp circt::hw::HierPathCache::getOrCreatePath | ( | ArrayAttr | pathArray, |
Location | loc, | ||
StringRef | nameHint = "xmrPath" |
||
) |
Get an existing hw::HierPathOp
at the default location in the circuit.
Definition at line 19 of file HierPathCache.cpp.
References getOrCreatePath(), and pathInsertPoint.
Referenced by getOrCreatePath().
|
private |
A namespace in which symbols for hierarchical path ops will be created.
Definition at line 48 of file HierPathCache.h.
Referenced by getOrCreatePath().
|
private |
A cache of already created HierPathOps.
This is used to avoid repeatedly creating the same HierPathOp.
Definition at line 52 of file HierPathCache.h.
Referenced by getOrCreatePath().
|
private |
The insertion point where the pass inserts HierPathOps.
Definition at line 55 of file HierPathCache.h.
Referenced by getOrCreatePath().