|
CIRCT 24.0.0git
|

Public Member Functions | |
| DiscoverLoops (FModuleOp module, InstanceGraph &instanceGraph, const DenseMap< FModuleLike, DrivenBysMapType > &otherModulePortPaths, DrivenBysMapType &thisModulePortPaths) | |
| LogicalResult | processModule () |
| void | constructConnectivityGraph (FModuleOp module) |
| unsigned | getOrAddNode (Value v) |
| unsigned | getOrAddNode (FieldRef f) |
| void | addDrivenBy (FieldRef dst, FieldRef src) |
| void | recordDataflow (Value dstVal, Value srcVal) |
| void | handleRefForce (Value dstProbe, Value srcVal) |
| void | processInstancePorts (FModuleOp refMod, ValueRange instResults) |
| void | handleInstanceOp (InstanceOp inst) |
| void | handleInstanceChoiceOp (InstanceChoiceOp inst) |
| void | recordValueRefersToFieldRef (Value base, unsigned fieldID, Value result) |
| LogicalResult | dfsTraverse (const DrivenByGraphType &graph) |
| void | reportLoopFound (SmallVectorImpl< FieldRef > &path, Location loc) |
| void | dumpMap () |
| void | recordProbe (Value data, Value ref) |
| void | probesReferToSameData (Value probe1, Value probe2) |
| void | addToPortPathsIfRWProbe (unsigned srcNode, DenseSet< FieldRef > &inputPortPaths) |
Static Public Member Functions | |
| static std::string | getName (FieldRef v) |
Private Types | |
| using | DrivenByGraphType |
| Adjacency list representation. | |
Private Attributes | |
| FModuleOp | module |
| InstanceGraph & | instanceGraph |
| DenseMap< Value, SmallVector< FieldRef > > | valToFieldRefs |
| Map of values to the set of all FieldRefs (same base) that this may be directly derived from through indexing operations. | |
| const DenseMap< FModuleLike, DrivenBysMapType > & | modulePortPaths |
| Comb paths that exist between module ports. | |
| DrivenBysMapType & | portPaths |
| The comb paths between the ports of this module. | |
| DrivenByGraphType | drivenBy |
| This is an adjacency list representation of the connectivity graph. | |
| DenseMap< FieldRef, size_t > | nodes |
| Map of FieldRef to its corresponding graph node. | |
| DenseMap< unsigned, unsigned > | rwProbeRefersTo |
| The base value that the RWProbe refers to. | |
| llvm::EquivalenceClasses< unsigned > | rwProbeClasses |
| An eqv class of all the RWProbes that refer to the same base value. | |
Definition at line 58 of file CheckCombLoops.cpp.
|
private |
Adjacency list representation.
Each entry is a pair, the first element is the FieldRef corresponding to the graph vertex. The second element is the list of vertices, that have an edge to this vertex. The directed edges represent a connectivity relation, of a source that drives the sink.
Definition at line 66 of file CheckCombLoops.cpp.
|
inline |
Definition at line 70 of file CheckCombLoops.cpp.
References instanceGraph, module, modulePortPaths, and portPaths.
Definition at line 216 of file CheckCombLoops.cpp.
References drivenBy, and getOrAddNode().
Referenced by constructConnectivityGraph(), processInstancePorts(), and recordDataflow().
|
inline |
Definition at line 665 of file CheckCombLoops.cpp.
References drivenBy, getOrAddNode(), and rwProbeClasses.
Referenced by dfsTraverse().
|
inline |
Definition at line 83 of file CheckCombLoops.cpp.
References addDrivenBy(), circt::firrtl::data, handleInstanceChoiceOp(), handleInstanceOp(), handleRefForce(), module, circt::firrtl::Out, probesReferToSameData(), recordDataflow(), recordProbe(), recordValueRefersToFieldRef(), and circt::firrtl::walkGroundTypes().
Referenced by processModule().
|
inline |
Definition at line 485 of file CheckCombLoops.cpp.
References addToPortPathsIfRWProbe(), drivenBy, failure(), getName(), circt::FieldRef::getValue(), isPort(), module, circt::firrtl::Out, portPaths, reportLoopFound(), and success().
Referenced by processModule().
|
inline |
Definition at line 610 of file CheckCombLoops.cpp.
References drivenBy, getName(), portPaths, rwProbeClasses, rwProbeRefersTo, and valToFieldRefs.
|
inlinestatic |
Definition at line 190 of file CheckCombLoops.cpp.
References circt::firrtl::getFieldName().
Referenced by dfsTraverse(), dumpMap(), and reportLoopFound().
|
inline |
Definition at line 200 of file CheckCombLoops.cpp.
|
inline |
Definition at line 192 of file CheckCombLoops.cpp.
References getOrAddNode(), and valToFieldRefs.
Referenced by addDrivenBy(), addToPortPathsIfRWProbe(), getOrAddNode(), handleRefForce(), probesReferToSameData(), processInstancePorts(), and recordProbe().
|
inline |
Definition at line 445 of file CheckCombLoops.cpp.
References instanceGraph, and processInstancePorts().
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 434 of file CheckCombLoops.cpp.
References instanceGraph, and processInstancePorts().
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 313 of file CheckCombLoops.cpp.
References assert(), drivenBy, getOrAddNode(), recordDataflow(), rwProbeClasses, and rwProbeRefersTo.
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 659 of file CheckCombLoops.cpp.
References getOrAddNode(), and rwProbeClasses.
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 335 of file CheckCombLoops.cpp.
References addDrivenBy(), drivenBy, getOrAddNode(), modulePortPaths, rwProbeClasses, rwProbeRefersTo, and circt::firrtl::type_dyn_cast().
Referenced by handleInstanceChoiceOp(), and handleInstanceOp().
|
inline |
Definition at line 77 of file CheckCombLoops.cpp.
References constructConnectivityGraph(), dfsTraverse(), drivenBy, and module.
Referenced by CheckCombLoopsPass::runOnOperation().
|
inline |
Definition at line 223 of file CheckCombLoops.cpp.
References addDrivenBy(), circt::firrtl::getBaseType(), circt::FieldRef::getSubField(), valToFieldRefs, and circt::firrtl::walkGroundTypes().
Referenced by constructConnectivityGraph(), and handleRefForce().
|
inline |
Definition at line 651 of file CheckCombLoops.cpp.
References circt::firrtl::data, getOrAddNode(), rwProbeClasses, and rwProbeRefersTo.
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 461 of file CheckCombLoops.cpp.
References valToFieldRefs.
Referenced by constructConnectivityGraph().
|
inline |
Definition at line 567 of file CheckCombLoops.cpp.
References getName(), and module.
Referenced by dfsTraverse().
|
private |
This is an adjacency list representation of the connectivity graph.
This can be indexed by the graph node id, and each entry is the list of graph nodes that has an edge to it. Each graph node represents a FieldRef and each edge represents a source that directly drives the sink node.
Definition at line 706 of file CheckCombLoops.cpp.
Referenced by addDrivenBy(), addToPortPathsIfRWProbe(), dfsTraverse(), dumpMap(), getOrAddNode(), handleRefForce(), processInstancePorts(), and processModule().
|
private |
Definition at line 689 of file CheckCombLoops.cpp.
Referenced by DiscoverLoops(), handleInstanceChoiceOp(), and handleInstanceOp().
|
private |
Definition at line 688 of file CheckCombLoops.cpp.
Referenced by constructConnectivityGraph(), dfsTraverse(), DiscoverLoops(), om.Evaluator::instantiate(), processModule(), and reportLoopFound().
|
private |
Comb paths that exist between module ports.
This is maintained across modules.
Definition at line 696 of file CheckCombLoops.cpp.
Referenced by DiscoverLoops(), and processInstancePorts().
|
private |
Map of FieldRef to its corresponding graph node.
Definition at line 708 of file CheckCombLoops.cpp.
Referenced by getOrAddNode().
|
private |
The comb paths between the ports of this module.
This is the final output of this intra-procedural analysis, that is used to construct the inter-procedural dataflow.
Definition at line 700 of file CheckCombLoops.cpp.
Referenced by dfsTraverse(), DiscoverLoops(), and dumpMap().
|
private |
An eqv class of all the RWProbes that refer to the same base value.
Definition at line 715 of file CheckCombLoops.cpp.
Referenced by addToPortPathsIfRWProbe(), dumpMap(), handleRefForce(), probesReferToSameData(), processInstancePorts(), and recordProbe().
|
private |
The base value that the RWProbe refers to.
Used to add an edge to the base value, when the probe is forced.
Definition at line 712 of file CheckCombLoops.cpp.
Referenced by dumpMap(), handleRefForce(), processInstancePorts(), and recordProbe().
|
private |
Map of values to the set of all FieldRefs (same base) that this may be directly derived from through indexing operations.
Definition at line 693 of file CheckCombLoops.cpp.
Referenced by dumpMap(), getOrAddNode(), recordDataflow(), and recordValueRefersToFieldRef().