LLVM
8.0.1
|
This class can compute a topological ordering for SUnits and provides methods for dynamically updating the ordering as new edges are added. More...
#include "llvm/CodeGen/ScheduleDAG.h"
Public Types | |
typedef std::vector< int >::iterator | iterator |
typedef std::vector< int >::const_iterator | const_iterator |
typedef std::vector< int >::reverse_iterator | reverse_iterator |
typedef std::vector< int >::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
ScheduleDAGTopologicalSort (std::vector< SUnit > &SUnits, SUnit *ExitSU) | |
void | InitDAGTopologicalSorting () |
Creates the initial topological ordering from the DAG to be scheduled. More... | |
std::vector< int > | GetSubGraph (const SUnit &StartSU, const SUnit &TargetSU, bool &Success) |
Returns an array of SUs that are both in the successor subtree of StartSU and in the predecessor subtree of TargetSU. More... | |
bool | IsReachable (const SUnit *SU, const SUnit *TargetSU) |
Checks if SU is reachable from TargetSU . More... | |
bool | WillCreateCycle (SUnit *TargetSU, SUnit *SU) |
Returns true if addPred(TargetSU, SU) creates a cycle. More... | |
void | AddPred (SUnit *Y, SUnit *X) |
Updates the topological ordering to accommodate an edge to be added from SUnit X to SUnit Y . More... | |
void | RemovePred (SUnit *M, SUnit *N) |
Updates the topological ordering to accommodate an an edge to be removed from the specified node N from the predecessors of the current node M . More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
This class can compute a topological ordering for SUnits and provides methods for dynamically updating the ordering as new edges are added.
This allows a very fast implementation of IsReachable, for example.
Definition at line 693 of file ScheduleDAG.h.
typedef std::vector<int>::const_iterator llvm::ScheduleDAGTopologicalSort::const_iterator |
Definition at line 747 of file ScheduleDAG.h.
typedef std::vector<int>::const_reverse_iterator llvm::ScheduleDAGTopologicalSort::const_reverse_iterator |
Definition at line 754 of file ScheduleDAG.h.
typedef std::vector<int>::iterator llvm::ScheduleDAGTopologicalSort::iterator |
Definition at line 746 of file ScheduleDAG.h.
typedef std::vector<int>::reverse_iterator llvm::ScheduleDAGTopologicalSort::reverse_iterator |
Definition at line 753 of file ScheduleDAG.h.
ScheduleDAGTopologicalSort::ScheduleDAGTopologicalSort | ( | std::vector< SUnit > & | SUnits, |
SUnit * | ExitSU | ||
) |
Definition at line 701 of file ScheduleDAG.cpp.
References llvm::ScheduleHazardRecognizer::~ScheduleHazardRecognizer().
Referenced by IsReachable().
Updates the topological ordering to accommodate an edge to be added from SUnit X
to SUnit Y
.
Definition at line 513 of file ScheduleDAG.cpp.
References assert(), DFS(), and llvm::SUnit::NodeNum.
Referenced by swapAntiDependences().
|
inline |
Definition at line 748 of file ScheduleDAG.h.
Referenced by llvm::SIScheduleDAGMI::SIScheduleDAGMI().
|
inline |
Definition at line 749 of file ScheduleDAG.h.
|
inline |
Definition at line 750 of file ScheduleDAG.h.
Referenced by llvm::SIScheduleDAGMI::SIScheduleDAGMI().
|
inline |
Definition at line 751 of file ScheduleDAG.h.
std::vector< int > ScheduleDAGTopologicalSort::GetSubGraph | ( | const SUnit & | StartSU, |
const SUnit & | TargetSU, | ||
bool & | Success | ||
) |
Returns an array of SUs that are both in the successor subtree of StartSU and in the predecessor subtree of TargetSU.
StartSU and TargetSU are not in the array. Success is false if TargetSU is not in the successor subtree of StartSU, else it is true.
Definition at line 561 of file ScheduleDAG.cpp.
References assert(), I, llvm::SUnit::isBoundaryNode(), llvm::SUnit::NodeNum, llvm::SUnit::Preds, llvm::BitVector::push_back(), llvm::BitVector::reset(), llvm::BitVector::resize(), llvm::BitVector::set(), llvm::SUnit::Succs, llvm::ScheduleDAG::SUnits, and llvm::BitVector::test().
Referenced by hasDataDependencyPred().
void ScheduleDAGTopologicalSort::InitDAGTopologicalSorting | ( | ) |
Creates the initial topological ordering from the DAG to be scheduled.
Definition at line 434 of file ScheduleDAG.cpp.
References assert(), llvm::ScheduleDAG::ExitSU, llvm::SDep::getSUnit(), llvm::SUnit::NodeNum, llvm::X86II::PD, llvm::SUnit::Preds, and llvm::ScheduleDAG::SUnits.
Referenced by llvm::GCNIterativeScheduler::BuildDAG::BuildDAG(), and llvm::SIScheduleDAGMI::SIScheduleDAGMI().
Checks if SU
is reachable from TargetSU
.
Definition at line 678 of file ScheduleDAG.cpp.
References DFS(), llvm::SUnit::NodeNum, llvm::BitVector::reset(), and ScheduleDAGTopologicalSort().
Referenced by swapAntiDependences().
|
inline |
Definition at line 755 of file ScheduleDAG.h.
Referenced by llvm::SIScheduleDAGMI::SIScheduleDAGMI().
|
inline |
Definition at line 756 of file ScheduleDAG.h.
Updates the topological ordering to accommodate an an edge to be removed from the specified node N
from the predecessors of the current node M
.
Definition at line 529 of file ScheduleDAG.cpp.
References llvm::make_range(), llvm::SUnit::NodeNum, llvm::SUnit::Succs, and llvm::ScheduleDAG::SUnits.
|
inline |
Definition at line 757 of file ScheduleDAG.h.
Referenced by llvm::SIScheduleDAGMI::SIScheduleDAGMI().
|
inline |
Definition at line 758 of file ScheduleDAG.h.
Returns true if addPred(TargetSU, SU) creates a cycle.
Definition at line 667 of file ScheduleDAG.cpp.
References llvm::SDep::getSUnit(), llvm::SDep::isAssignedRegDep(), and llvm::SUnit::Preds.