|
CIRCT 24.0.0git
|


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) |
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 > * | 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 |
| hw::HierPathCache * | hierPathCache |
| Utility to create HerPathOps at a predefined location in the circuit. | |
| DenseMap< FModuleOp, ModuleState > | moduleStates |
| Per-module helpers for creating operations within modules. | |
Definition at line 126 of file LowerXMR.cpp.
|
inlineprivate |
Definition at line 807 of file LowerXMR.cpp.
References dataflowAt, dataFlowClasses, and refSendPathList.
Referenced by handleInstanceOp(), and runOnOperation().
|
inlineprivate |
Definition at line 816 of file LowerXMR.cpp.
References dataflowAt, moduleStates, opsToRemove, refPortsToRemoveMap, and refSendPathList.
|
inlineprivate |
Definition at line 774 of file LowerXMR.cpp.
References getModuleNamespace().
|
inlineprivate |
Definition at line 763 of file LowerXMR.cpp.
References circt::firrtl::getInnerRefTo().
Referenced by runOnOperation().
|
inlineprivate |
Get the cached namespace for a module.
Definition at line 759 of file LowerXMR.cpp.
References moduleNamespaces.
Referenced by getInnerRefTo().
|
inlineprivate |
Get full macro name as StringAttr for the specified ref port.
Uses existing 'prefix', optionally preprends the backtick character.
Definition at line 471 of file LowerXMR.cpp.
Referenced by handleInstanceOp(), and handlePublicModuleRefPorts().
|
inlineprivate |
Generate the ABI ref_<module> prefix string into prefix.
Definition at line 462 of file LowerXMR.cpp.
References toVector().
Referenced by handleInstanceOp(), and handlePublicModuleRefPorts().
|
inlineprivate |
Definition at line 783 of file LowerXMR.cpp.
References dataflowAt, and dataFlowClasses.
Referenced by handleInstanceOp(), resolveReference(), resolveReferencePath(), and runOnOperation().
|
inlineprivate |
Definition at line 567 of file LowerXMR.cpp.
References failure(), isZeroWidth(), moduleStates, resolveReference(), and success().
|
inlineprivate |
Get the resolution string for this ref-type port.
Definition at line 628 of file LowerXMR.cpp.
References addReachingSendsEntry(), dataFlowClasses, failure(), circt::firrtl::getInnerRefTo(), getRefABIMacroForPort(), getRefABIPrefix(), getRemoteRefSend(), isZeroWidth(), circt::firrtl::Out, setPortToRemove(), success(), circt::firrtl::type_cast(), visitedModules, and xmrPathSuffix.
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 703 of file LowerXMR.cpp.
References failure(), getRefABIMacroForPort(), getRefABIPrefix(), isZeroWidth(), circt::firrtl::Out, resolveReferencePath(), success(), and circt::firrtl::type_dyn_cast().
|
inlineprivate |
Definition at line 597 of file LowerXMR.cpp.
References failure(), circt::firrtl::getBitWidth(), circt::firrtl::getIntZerosAttr(), resolve(), resolveReference(), and success().
|
inlineprivate |
Definition at line 863 of file LowerXMR.cpp.
References circt::firrtl::FIRRTLBaseType::getBitWidthOrSentinel().
Referenced by handleForceReleaseOp(), handleInstanceOp(), handlePublicModuleRefPorts(), and runOnOperation().
|
inlineprivate |
Definition at line 781 of file LowerXMR.cpp.
References opsToRemove.
Referenced by runOnOperation().
|
inlineprivate |
Definition at line 550 of file LowerXMR.cpp.
References failure(), getRemoteRefSend(), resolveReferencePath(), and success().
Referenced by handleForceReleaseOp(), and handleRefResolve().
|
inlineprivate |
Definition at line 477 of file LowerXMR.cpp.
References assert(), failure(), getRemoteRefSend(), hierPathCache, refSendPathList, success(), toVector(), and xmrPathSuffix.
Referenced by handlePublicModuleRefPorts(), and resolveReference().
|
inlineoverrideprivate |
Definition at line 128 of file LowerXMR.cpp.
References addReachingSendsEntry(), circuitNamespace, dataFlowClasses, failure(), getBodyBlock(), circt::firrtl::getFieldName(), circt::firrtl::getFieldRefFromValue(), getInnerRefTo(), getRemoteRefSend(), handleInstanceOp(), hierPathCache, isZeroWidth(), markForRemoval(), moduleStates, refPortsToRemoveMap, resolve(), setPortToRemove(), success(), toVector(), circt::firrtl::type_cast(), circt::firrtl::type_isa(), circt::igraph::InstanceGraph::walkPostOrder(), and xmrPathSuffix.
|
inlineprivate |
Definition at line 621 of file LowerXMR.cpp.
References refPortsToRemoveMap.
Referenced by handleInstanceOp(), and runOnOperation().
|
private |
Definition at line 895 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 874 of file LowerXMR.cpp.
Referenced by addReachingSendsEntry(), garbageCollect(), and getRemoteRefSend().
|
private |
Definition at line 885 of file LowerXMR.cpp.
Referenced by addReachingSendsEntry(), getRemoteRefSend(), handleInstanceOp(), and runOnOperation().
|
private |
Utility to create HerPathOps at a predefined location in the circuit.
This handles caching and keeps the order consistent.
Definition at line 899 of file LowerXMR.cpp.
Referenced by resolveReferencePath(), and runOnOperation().
|
private |
Cached module namespaces.
Definition at line 867 of file LowerXMR.cpp.
Referenced by getModuleNamespace().
|
private |
Per-module helpers for creating operations within modules.
Definition at line 902 of file LowerXMR.cpp.
Referenced by garbageCollect(), handleForceReleaseOp(), and runOnOperation().
|
private |
RefResolve, RefSend, and Connects involving them that will be removed.
Definition at line 890 of file LowerXMR.cpp.
Referenced by garbageCollect(), and markForRemoval().
|
private |
Definition at line 887 of file LowerXMR.cpp.
Referenced by garbageCollect(), runOnOperation(), and setPortToRemove().
|
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 883 of file LowerXMR.cpp.
Referenced by addReachingSendsEntry(), garbageCollect(), and resolveReferencePath().
|
private |
Definition at line 869 of file LowerXMR.cpp.
Referenced by handleInstanceOp().
|
private |
Record the internal path to an external module or a memory.
Definition at line 893 of file LowerXMR.cpp.
Referenced by handleInstanceOp(), resolveReferencePath(), and runOnOperation().