CIRCT 20.0.0git
|
Classes | |
struct | ValueComparator |
llvm::EquivalenceClasses wants comparable elements. More... | |
Private Member Functions | |
void | runOnOperation () override |
void | getRefABIPrefix (FModuleLike mod, SmallVectorImpl< char > &prefix) |
Generate the ABI ref_<module> prefix string into prefix . | |
StringAttr | getRefABIMacroForPort (FModuleLike mod, size_t portIndex, const Twine &prefix, bool backTick=false) |
Get full macro name as StringAttr for the specified ref port. | |
LogicalResult | resolveReferencePath (mlir::TypedValue< RefType > refVal, ImplicitLocOpBuilder builder, mlir::FlatSymbolRefAttr &ref, SmallString< 128 > &stringLeaf) |
LogicalResult | resolveReference (mlir::TypedValue< RefType > refVal, ImplicitLocOpBuilder &builder, FlatSymbolRefAttr &ref, StringAttr &xmrAttr) |
LogicalResult | handleForceReleaseOp (Operation *op) |
LogicalResult | handleRefResolve (RefResolveOp resolve) |
void | setPortToRemove (Operation *op, size_t index, size_t numPorts) |
LogicalResult | handleInstanceOp (InstanceOp inst, InstanceGraph &instanceGraph) |
LogicalResult | handlePublicModuleRefPorts (FModuleOp module) |
hw::InnerSymbolNamespace & | getModuleNamespace (FModuleLike module) |
Get the cached namespace for a module. | |
InnerRefAttr | getInnerRefTo (Value val) |
InnerRefAttr | getInnerRefTo (Operation *op) |
void | markForRemoval (Operation *op) |
std::optional< size_t > | getRemoteRefSend (Value val, bool errorIfNotFound=true) |
size_t | addReachingSendsEntry (Value atRefVal, XMRNode::SymOrIndexOp info, std::optional< size_t > continueFrom=std::nullopt) |
void | garbageCollect () |
bool | isZeroWidth (FIRRTLBaseType t) |
hw::HierPathOp | getOrCreatePath (ArrayAttr pathArray, ImplicitLocOpBuilder &builder) |
Return a HierPathOp for the provided pathArray. | |
Private Attributes | |
DenseMap< Operation *, hw::InnerSymbolNamespace > | moduleNamespaces |
Cached module namespaces. | |
DenseSet< Operation * > | visitedModules |
DenseMap< Value, size_t > | dataflowAt |
Map of a reference value to an entry into refSendPathList. | |
SmallVector< XMRNode > | refSendPathList |
refSendPathList is used to construct a path to the RefSendOp. | |
llvm::EquivalenceClasses< Value, ValueComparator > * | dataFlowClasses |
DenseMap< Operation *, llvm::BitVector > | refPortsToRemoveMap |
SmallVector< Operation * > | opsToRemove |
RefResolve, RefSend, and Connects involving them that will be removed. | |
DenseMap< size_t, SmallString< 128 > > | xmrPathSuffix |
Record the internal path to an external module or a memory. | |
CircuitNamespace * | circuitNamespace |
DenseMap< Attribute, hw::HierPathOp > | pathCache |
A cache of already created HierPathOps. | |
OpBuilder::InsertPoint | pathInsertPoint = {} |
The insertion point where the pass inserts HierPathOps. | |
DenseMap< FModuleOp, ModuleState > | moduleStates |
Per-module helpers for creating operations within modules. | |
Definition at line 125 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 770 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 779 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 737 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 726 of file LowerXMR.cpp.
References circt::firrtl::getInnerRefTo().
Referenced by runOnOperation().
|
inlineprivate |
Get the cached namespace for a module.
Definition at line 722 of file LowerXMR.cpp.
|
inlineprivate |
Return a HierPathOp for the provided pathArray.
This will either return an existing HierPathOp or it will create and return a new one.
Definition at line 831 of file LowerXMR.cpp.
References assert(), and getBodyBlock().
|
inlineprivate |
Get full macro name as StringAttr for the specified ref port.
Uses existing 'prefix', optionally preprends the backtick character.
Definition at line 426 of file LowerXMR.cpp.
|
inlineprivate |
Generate the ABI ref_<module> prefix string into prefix
.
Definition at line 414 of file LowerXMR.cpp.
References toVector().
|
inlineprivate |
Definition at line 746 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 520 of file LowerXMR.cpp.
|
inlineprivate |
Get the resolution string for this ref-type port.
Definition at line 581 of file LowerXMR.cpp.
References circt::firrtl::getInnerRefTo().
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 667 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 550 of file LowerXMR.cpp.
References circt::firrtl::getBitWidth(), and circt::firrtl::getIntZerosAttr().
|
inlineprivate |
Definition at line 827 of file LowerXMR.cpp.
References circt::firrtl::FIRRTLBaseType::getBitWidthOrSentinel().
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 744 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 503 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 432 of file LowerXMR.cpp.
References assert(), and toVector().
|
inlineoverrideprivate |
Definition at line 127 of file LowerXMR.cpp.
References addReachingSendsEntry(), circuitNamespace, dataFlowClasses, circt::firrtl::getFieldName(), circt::firrtl::getFieldRefFromValue(), getInnerRefTo(), getRemoteRefSend(), handleInstanceOp(), isZeroWidth(), markForRemoval(), moduleStates, refPortsToRemoveMap, setPortToRemove(), toVector(), and xmrPathSuffix.
|
inlineprivate |
Definition at line 574 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
private |
Definition at line 904 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
private |
Map of a reference value to an entry into refSendPathList.
Each entry in refSendPathList represents the path to RefSend. The path is required since there can be multiple paths to the RefSend and we need to identify a unique path.
Definition at line 875 of file LowerXMR.cpp.
|
private |
Definition at line 894 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
private |
Cached module namespaces.
Definition at line 868 of file LowerXMR.cpp.
|
private |
Per-module helpers for creating operations within modules.
Definition at line 914 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
private |
RefResolve, RefSend, and Connects involving them that will be removed.
Definition at line 899 of file LowerXMR.cpp.
|
private |
A cache of already created HierPathOps.
This is used to avoid repeatedly creating the same HierPathOp.
Definition at line 908 of file LowerXMR.cpp.
|
private |
The insertion point where the pass inserts HierPathOps.
Definition at line 911 of file LowerXMR.cpp.
|
private |
Definition at line 896 of file LowerXMR.cpp.
Referenced by runOnOperation().
|
private |
refSendPathList is used to construct a path to the RefSendOp.
Each entry is an XMRNode, with an InnerRefAttr or indexing op, and a pointer to the next node in the path. The InnerRefAttr can be to an InstanceOp or to the XMR defining op, the index op records narrowing along path. All the nodes representing an InstanceOp or indexing operation must have a valid NextNodeOnPath. Only the node representing the final XMR defining op has no NextNodeOnPath, which denotes a leaf node on the path.
Definition at line 884 of file LowerXMR.cpp.
|
private |
Definition at line 870 of file LowerXMR.cpp.
|
private |
Record the internal path to an external module or a memory.
Definition at line 902 of file LowerXMR.cpp.
Referenced by runOnOperation().