CIRCT  18.0.0git
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
circt::igraph::InstanceRecord Class Reference

This is an edge in the InstanceGraph. More...

#include <InstanceGraph.h>

Inheritance diagram for circt::igraph::InstanceRecord:
Inheritance graph
[legend]
Collaboration diagram for circt::igraph::InstanceRecord:
Collaboration graph
[legend]

Public Member Functions

template<typename TTarget = InstanceOpInterface>
auto getInstance ()
 Get the instance-like op that this is tracking. More...
 
InstanceGraphNodegetParent () const
 Get the module where the instantiation lives. More...
 
InstanceGraphNodegetTarget () const
 Get the module which the instance-like is instantiating. More...
 
void erase ()
 Erase this instance record, removing it from the parent module and the target's use-list. More...
 

Private Member Functions

 InstanceRecord (InstanceGraphNode *parent, InstanceOpInterface instance, InstanceGraphNode *target)
 
 InstanceRecord (const InstanceRecord &)=delete
 

Private Attributes

InstanceGraphNodeparent
 This is the module where the instantiation lives. More...
 
InstanceOpInterface instance
 The InstanceLike that this is tracking. More...
 
InstanceGraphNodetarget
 This is the module which the instance-like is instantiating. More...
 
InstanceRecordnextUse = nullptr
 Intrusive linked list for other uses. More...
 
InstanceRecordprevUse = nullptr
 

Friends

class InstanceGraph
 Iterates over the handshake::FuncOp's in the program to build an instance graph. More...
 
class InstanceGraphNode
 

Detailed Description

This is an edge in the InstanceGraph.

This tracks a specific instantiation of a module.

Definition at line 54 of file InstanceGraph.h.

Constructor & Destructor Documentation

◆ InstanceRecord() [1/2]

circt::igraph::InstanceRecord::InstanceRecord ( InstanceGraphNode parent,
InstanceOpInterface  instance,
InstanceGraphNode target 
)
inlineprivate

Definition at line 79 of file InstanceGraph.h.

◆ InstanceRecord() [2/2]

circt::igraph::InstanceRecord::InstanceRecord ( const InstanceRecord )
privatedelete

Member Function Documentation

◆ erase()

void InstanceRecord::erase ( )

Erase this instance record, removing it from the parent module and the target's use-list.

Definition at line 16 of file InstanceGraph.cpp.

References circt::igraph::InstanceGraphNode::firstUse, getParent(), circt::igraph::InstanceGraphNode::instances, nextUse, prevUse, and target.

◆ getInstance()

template<typename TTarget = InstanceOpInterface>
auto circt::igraph::InstanceRecord::getInstance ( )
inline

Get the instance-like op that this is tracking.

Definition at line 59 of file InstanceGraph.h.

References instance, and value.

◆ getParent()

InstanceGraphNode* circt::igraph::InstanceRecord::getParent ( ) const
inline

Get the module where the instantiation lives.

Definition at line 66 of file InstanceGraph.h.

References parent.

Referenced by erase(), and llvm::GraphTraits< llvm::Inverse< circt::igraph::InstanceGraphNode * > >::getParent().

◆ getTarget()

InstanceGraphNode* circt::igraph::InstanceRecord::getTarget ( ) const
inline

Get the module which the instance-like is instantiating.

Definition at line 69 of file InstanceGraph.h.

References target.

Referenced by llvm::GraphTraits< circt::igraph::InstanceGraphNode * >::getChild().

Friends And Related Function Documentation

◆ InstanceGraph

friend class InstanceGraph
friend

Iterates over the handshake::FuncOp's in the program to build an instance graph.

In doing so, we detect whether there are any cycles in this graph, as well as infer a top function for the design by performing a topological sort of the instance graph. The result of this sort is placed in sortedFuncs.

Definition at line 76 of file InstanceGraph.h.

◆ InstanceGraphNode

friend class InstanceGraphNode
friend

Definition at line 77 of file InstanceGraph.h.

Member Data Documentation

◆ instance

InstanceOpInterface circt::igraph::InstanceRecord::instance
private

The InstanceLike that this is tracking.

Definition at line 88 of file InstanceGraph.h.

Referenced by getInstance().

◆ nextUse

InstanceRecord* circt::igraph::InstanceRecord::nextUse = nullptr
private

Intrusive linked list for other uses.

Definition at line 93 of file InstanceGraph.h.

Referenced by erase(), circt::igraph::InstanceGraphNode::UseIterator::operator++(), and circt::igraph::InstanceGraphNode::recordUse().

◆ parent

InstanceGraphNode* circt::igraph::InstanceRecord::parent
private

This is the module where the instantiation lives.

Definition at line 85 of file InstanceGraph.h.

Referenced by getParent().

◆ prevUse

InstanceRecord* circt::igraph::InstanceRecord::prevUse = nullptr
private

Definition at line 94 of file InstanceGraph.h.

Referenced by erase(), and circt::igraph::InstanceGraphNode::recordUse().

◆ target

InstanceGraphNode* circt::igraph::InstanceRecord::target
private

This is the module which the instance-like is instantiating.

Definition at line 91 of file InstanceGraph.h.

Referenced by erase(), and getTarget().


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