LLVM API Documentation
Compute the values of each DAG node for various metrics during DFS. More...
#include <ScheduleDFS.h>
Public Member Functions | |
SchedDFSResult (bool IsBU, unsigned lim) | |
unsigned | getSubtreeLimit () const |
Get the node cutoff before subtrees are considered significant. More... | |
bool | empty () const |
Return true if this DFSResult is uninitialized. More... | |
void | clear () |
Clear the results. More... | |
void | resize (unsigned NumSUnits) |
Initialize the result data with the size of the DAG. More... | |
void | compute (ArrayRef< SUnit > SUnits) |
Compute various metrics for the DAG with given roots. More... | |
unsigned | getNumInstrs (const SUnit *SU) const |
Get the number of instructions in the given subtree and its children. More... | |
unsigned | getNumSubInstrs (unsigned SubtreeID) const |
Get the number of instructions in the given subtree not including children. More... | |
ILPValue | getILP (const SUnit *SU) const |
Get the ILP value for a DAG node. More... | |
unsigned | getNumSubtrees () const |
The number of subtrees detected in this DAG. More... | |
unsigned | getSubtreeID (const SUnit *SU) const |
Get the ID of the subtree the given DAG node belongs to. More... | |
unsigned | getSubtreeLevel (unsigned SubtreeID) const |
Get the connection level of a subtree. More... | |
void | scheduleTree (unsigned SubtreeID) |
Scheduler callback to update SubtreeConnectLevels when a tree is initially scheduled. More... | |
Friends | |
class | SchedDFSImpl |
Compute the values of each DAG node for various metrics during DFS.
Definition at line 68 of file ScheduleDFS.h.
Definition at line 119 of file ScheduleDFS.h.
|
inline |
Clear the results.
Definition at line 131 of file ScheduleDFS.h.
References llvm::SmallVectorImpl< T >::clear().
Referenced by llvm::ScheduleDAGMI::computeDFSResult().
Compute various metrics for the DAG with given roots.
Compute an ILP metric for all nodes in the subDAG reachable via depth-first search from this root.
Definition at line 1261 of file ScheduleDAGInstrs.cpp.
References llvm::ArrayRef< T >::begin(), llvm::SDep::Data, llvm::ArrayRef< T >::end(), llvm::SchedDFSImpl::finalize(), llvm::SDep::getKind(), llvm::SDep::getSUnit(), hasDataSucc(), llvm::SUnit::isBoundaryNode(), llvm::SchedDFSImpl::isVisited(), llvm_unreachable, llvm::SchedDFSImpl::visitCrossEdge(), llvm::SchedDFSImpl::visitPostorderEdge(), llvm::SchedDFSImpl::visitPostorderNode(), and llvm::SchedDFSImpl::visitPreorder().
Referenced by llvm::ScheduleDAGMI::computeDFSResult().
|
inline |
Return true if this DFSResult is uninitialized.
resize() initializes DFSResult, while compute() populates it.
Definition at line 128 of file ScheduleDFS.h.
Referenced by getSubtreeID().
Get the ILP value for a DAG node.
A leaf node has an ILP of 1/1.
Definition at line 161 of file ScheduleDFS.h.
References llvm::SUnit::getDepth(), and llvm::SUnit::NodeNum.
Get the number of instructions in the given subtree and its children.
Definition at line 148 of file ScheduleDFS.h.
References llvm::SUnit::NodeNum.
Referenced by llvm::DOTGraphTraits< ScheduleDAGMI * >::getNodeLabel().
Get the number of instructions in the given subtree not including children.
Definition at line 154 of file ScheduleDFS.h.
|
inline |
The number of subtrees detected in this DAG.
Definition at line 166 of file ScheduleDFS.h.
Referenced by llvm::ScheduleDAGMI::computeDFSResult(), and llvm::SchedDFSImpl::finalize().
Get the ID of the subtree the given DAG node belongs to.
For convenience, if DFSResults have not been computed yet, give everything tree ID 0.
Definition at line 172 of file ScheduleDFS.h.
References empty(), and llvm::SUnit::NodeNum.
Referenced by llvm::DOTGraphTraits< ScheduleDAGMI * >::getNodeAttributes(), and llvm::ScheduleDAGMI::updateQueues().
Get the connection level of a subtree.
For bottom-up trees, the connection level is the latency depth (in cycles) of the deepest connection to another subtree.
Definition at line 183 of file ScheduleDFS.h.
|
inline |
Get the node cutoff before subtrees are considered significant.
Definition at line 123 of file ScheduleDFS.h.
|
inline |
Initialize the result data with the size of the DAG.
Definition at line 139 of file ScheduleDFS.h.
Referenced by llvm::ScheduleDAGMI::computeDFSResult().
void SchedDFSResult::scheduleTree | ( | unsigned | SubtreeID | ) |
Scheduler callback to update SubtreeConnectLevels when a tree is initially scheduled.
The root of the given SubtreeID was just scheduled. For all subtrees connected to this tree, record the depth of the connection so that the nearest connected subtrees can be prioritized.
Definition at line 1309 of file ScheduleDAGInstrs.cpp.
References llvm::sys::path::begin(), llvm::dbgs(), DEBUG, llvm::sys::path::end(), and I.
Referenced by llvm::ScheduleDAGMI::updateQueues().
|
friend |
Definition at line 69 of file ScheduleDFS.h.