CIRCT
20.0.0git
|
A wrapper class to uniformly handle def-use and auxiliary dependence edges. More...
#include <DependenceIterator.h>
Public Types | |
using | TupleRepr = std::tuple< Operation *, Operation *, std::optional< unsigned >, std::optional< unsigned > > |
The "expanded" representation of a dependence, intended as the key for comparisons and hashing. More... | |
Public Member Functions | |
Dependence (OpOperand *defUseDep) | |
Wrap a def-use dependence, which is uniquely identified in the SSA graph by an OpOperand . More... | |
Dependence (std::pair< Operation *, Operation * > auxDep) | |
Wrap an auxiliary dependence, identified by the pair of its endpoints. More... | |
Dependence (Operation *from, Operation *to) | |
Wrap an auxiliary dependence between from and to . More... | |
Dependence () | |
Construct an invalid dependence. More... | |
bool | isAuxiliary () const |
Return true if this is a valid auxiliary dependence. More... | |
bool | isDefUse () const |
Return true if this is a valid def-use dependence. More... | |
bool | isInvalid () const |
Return true if this is an invalid dependence. More... | |
Operation * | getSource () const |
Return the source of the dependence. More... | |
Operation * | getDestination () const |
Return the destination of the dependence. More... | |
std::optional< unsigned > | getSourceIndex () const |
Return the source operation's result number, if applicable. More... | |
std::optional< unsigned > | getDestinationIndex () const |
Return the destination operation's operand number, if applicable. More... | |
TupleRepr | getAsTuple () const |
Return the tuple representation of this dependence. More... | |
bool | operator== (const Dependence &other) const |
Private Attributes | |
Operation * | auxSrc |
union { | |
Operation * auxDst | |
OpOperand * defUse | |
}; | |
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.
using circt::scheduling::detail::Dependence::TupleRepr = 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.
|
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.
|
inline |
Wrap an auxiliary dependence, identified by the pair of its endpoints.
Definition at line 46 of file DependenceIterator.h.
|
inline |
Wrap an auxiliary dependence between from
and to
.
Definition at line 49 of file DependenceIterator.h.
|
inline |
Construct an invalid dependence.
Definition at line 51 of file DependenceIterator.h.
Dependence::TupleRepr Dependence::getAsTuple | ( | ) | const |
Return the tuple representation of this dependence.
Definition at line 467 of file Problems.cpp.
References getDestination(), getDestinationIndex(), getSource(), and getSourceIndex().
Referenced by llvm::DenseMapInfo< Dependence >::getHashValue(), and operator==().
Operation * Dependence::getDestination | ( | ) | const |
Return the destination of the dependence.
Definition at line 449 of file Problems.cpp.
References auxDst, defUse, and isDefUse().
Referenced by circt::scheduling::ChainingCyclicProblem::checkDefUse(), getAsTuple(), circt::scheduling::Problem::insertDependence(), circt::scheduling::Problem::verifyPrecedence(), circt::scheduling::CyclicProblem::verifyPrecedence(), and circt::scheduling::ChainingProblem::verifyPrecedenceInCycle().
std::optional< unsigned > Dependence::getDestinationIndex | ( | ) | const |
Return the destination operation's operand number, if applicable.
Definition at line 461 of file Problems.cpp.
References defUse, and isDefUse().
Referenced by getAsTuple().
Operation * Dependence::getSource | ( | ) | const |
Return the source of the dependence.
Definition at line 445 of file Problems.cpp.
References auxSrc, defUse, and isDefUse().
Referenced by circt::scheduling::detail::DependenceIterator::findNextDependence(), getAsTuple(), circt::scheduling::Problem::insertDependence(), circt::scheduling::Problem::verifyPrecedence(), circt::scheduling::CyclicProblem::verifyPrecedence(), and circt::scheduling::ChainingProblem::verifyPrecedenceInCycle().
std::optional< unsigned > Dependence::getSourceIndex | ( | ) | const |
Return the source operation's result number, if applicable.
Definition at line 453 of file Problems.cpp.
References assert(), defUse, and isDefUse().
Referenced by getAsTuple().
|
inline |
Return true if this is a valid auxiliary dependence.
Definition at line 54 of file DependenceIterator.h.
References auxDst, and auxSrc.
Referenced by circt::scheduling::ChainingCyclicProblem::checkDefUse(), circt::scheduling::Problem::insertDependence(), and circt::scheduling::ChainingProblem::verifyPrecedenceInCycle().
|
inline |
Return true if this is a valid def-use dependence.
Definition at line 56 of file DependenceIterator.h.
References auxDst, and auxSrc.
Referenced by getDestination(), getDestinationIndex(), getSource(), and getSourceIndex().
|
inline |
Return true if this is an invalid dependence.
Definition at line 58 of file DependenceIterator.h.
References auxDst.
bool Dependence::operator== | ( | const Dependence & | other | ) | const |
Definition at line 472 of file Problems.cpp.
References getAsTuple().
union { ... } |
Operation* circt::scheduling::detail::Dependence::auxDst |
Definition at line 78 of file DependenceIterator.h.
Referenced by getDestination(), isAuxiliary(), isDefUse(), and isInvalid().
|
private |
Definition at line 76 of file DependenceIterator.h.
Referenced by getSource(), isAuxiliary(), and isDefUse().
OpOperand* circt::scheduling::detail::Dependence::defUse |
Definition at line 79 of file DependenceIterator.h.
Referenced by getDestination(), getDestinationIndex(), getSource(), and getSourceIndex().