CIRCT 24.0.0git
Loading...
Searching...
No Matches
llvm::Dependence Class Reference

A wrapper class to uniformly handle def-use and auxiliary dependence edges. More...

#include <DependenceIterator.h>

Collaboration diagram for llvm::Dependence:

Public Types

using TupleRepr
 The "expanded" representation of a dependence, intended as the key for comparisons and hashing.

Public Member Functions

 Dependence (OpOperand *defUseDep)
 Wrap a def-use dependence, which is uniquely identified in the SSA graph by an OpOperand.
 Dependence (std::pair< Operation *, Operation * > auxDep)
 Wrap an auxiliary dependence, identified by the pair of its endpoints.
 Dependence (Operation *from, Operation *to)
 Wrap an auxiliary dependence between from and to.
 Dependence ()
 Construct an invalid dependence.
bool isAuxiliary () const
 Return true if this is a valid auxiliary dependence.
bool isDefUse () const
 Return true if this is a valid def-use dependence.
bool isInvalid () const
 Return true if this is an invalid dependence.
Operation * getSource () const
 Return the source of the dependence.
Operation * getDestination () const
 Return the destination of the dependence.
std::optional< unsigned > getSourceIndex () const
 Return the source operation's result number, if applicable.
std::optional< unsigned > getDestinationIndex () const
 Return the destination operation's operand number, if applicable.
TupleRepr getAsTuple () const
 Return the tuple representation of this dependence.
bool operator== (const Dependence &other) const

Private Attributes

Operation * auxSrc
union { 
   Operation *   auxDst 
   OpOperand *   defUse 
}; 

Detailed Description

A wrapper class to uniformly handle def-use and auxiliary dependence edges.

Should be small enough (two pointers) to be passed around by value.

Definition at line 34 of file DependenceIterator.h.

Member Typedef Documentation

◆ TupleRepr

Initial value:
std::tuple<Operation *, Operation *, std::optional<unsigned>,
std::optional<unsigned>>

The "expanded" representation of a dependence, intended as the key for comparisons and hashing.

Definition at line 38 of file DependenceIterator.h.

Constructor & Destructor Documentation

◆ Dependence() [1/4]

circt::scheduling::detail::Dependence::Dependence ( OpOperand * defUseDep)
inline

Wrap a def-use dependence, which is uniquely identified in the SSA graph by an OpOperand.

Definition at line 44 of file DependenceIterator.h.

◆ Dependence() [2/4]

circt::scheduling::detail::Dependence::Dependence ( std::pair< Operation *, Operation * > auxDep)
inline

Wrap an auxiliary dependence, identified by the pair of its endpoints.

Definition at line 46 of file DependenceIterator.h.

◆ Dependence() [3/4]

circt::scheduling::detail::Dependence::Dependence ( Operation * from,
Operation * to )
inline

Wrap an auxiliary dependence between from and to.

Definition at line 49 of file DependenceIterator.h.

◆ Dependence() [4/4]

Construct an invalid dependence.

Definition at line 51 of file DependenceIterator.h.

Member Function Documentation

◆ getAsTuple()

Return the tuple representation of this dependence.

Definition at line 511 of file Problems.cpp.

◆ getDestination()

Operation * Dependence::getDestination ( ) const

Return the destination of the dependence.

Definition at line 493 of file Problems.cpp.

◆ getDestinationIndex()

std::optional< unsigned > Dependence::getDestinationIndex ( ) const

Return the destination operation's operand number, if applicable.

Definition at line 505 of file Problems.cpp.

◆ getSource()

Operation * Dependence::getSource ( ) const

Return the source of the dependence.

Definition at line 489 of file Problems.cpp.

◆ getSourceIndex()

std::optional< unsigned > Dependence::getSourceIndex ( ) const

Return the source operation's result number, if applicable.

Definition at line 497 of file Problems.cpp.

◆ isAuxiliary()

Return true if this is a valid auxiliary dependence.

Definition at line 54 of file DependenceIterator.h.

◆ isDefUse()

Return true if this is a valid def-use dependence.

Definition at line 56 of file DependenceIterator.h.

◆ isInvalid()

Return true if this is an invalid dependence.

Definition at line 58 of file DependenceIterator.h.

◆ operator==()

bool Dependence::operator== ( const Dependence & other) const

Definition at line 516 of file Problems.cpp.

Member Data Documentation

◆ [union]

◆ auxDst

◆ auxSrc

Definition at line 76 of file DependenceIterator.h.

◆ defUse


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