LLVM API Documentation
Internal state used to compute SchedDFSResult. More...
Classes | |
struct | RootData |
Public Member Functions | |
SchedDFSImpl (SchedDFSResult &r) | |
bool | isVisited (const SUnit *SU) const |
void | visitPreorder (const SUnit *SU) |
void | visitPostorderNode (const SUnit *SU) |
void | visitPostorderEdge (const SDep &PredDep, const SUnit *Succ) |
void | visitCrossEdge (const SDep &PredDep, const SUnit *Succ) |
Add a connection for cross edges. | |
void | finalize () |
Protected Member Functions | |
bool | joinPredSubtree (const SDep &PredDep, const SUnit *Succ, bool CheckLimit=true) |
void | addConnection (unsigned FromTree, unsigned ToTree, unsigned Depth) |
Called by finalize() to record a connection between trees. |
Internal state used to compute SchedDFSResult.
Definition at line 1231 of file ScheduleDAGInstrs.cpp.
llvm::SchedDFSImpl::SchedDFSImpl | ( | SchedDFSResult & | r | ) | [inline] |
Definition at line 1254 of file ScheduleDAGInstrs.cpp.
void llvm::SchedDFSImpl::addConnection | ( | unsigned | FromTree, |
unsigned | ToTree, | ||
unsigned | Depth | ||
) | [inline, protected] |
Called by finalize() to record a connection between trees.
Definition at line 1401 of file ScheduleDAGInstrs.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
void llvm::SchedDFSImpl::finalize | ( | ) | [inline] |
Set each node's subtree ID to the representative ID and record connections between trees.
Definition at line 1333 of file ScheduleDAGInstrs.cpp.
References llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::begin(), llvm::dbgs(), DEBUG, and I.
Referenced by llvm::SchedDFSResult::compute().
bool llvm::SchedDFSImpl::isVisited | ( | const SUnit * | SU | ) | const [inline] |
Return true if this node been visited by the DFS traversal.
During visitPostorderNode the Node's SubtreeID is assigned to the Node ID. Later, SubtreeID is updated but remains valid.
Definition at line 1262 of file ScheduleDAGInstrs.cpp.
References llvm::SUnit::NodeNum.
Referenced by llvm::SchedDFSResult::compute().
bool llvm::SchedDFSImpl::joinPredSubtree | ( | const SDep & | PredDep, |
const SUnit * | Succ, | ||
bool | CheckLimit = true |
||
) | [inline, protected] |
Join the predecessor subtree with the successor that is its DFS parent. Apply some heuristics before joining.
Definition at line 1373 of file ScheduleDAGInstrs.cpp.
References llvm::SDep::Data, llvm::SDep::getKind(), llvm::SDep::getSUnit(), and llvm::SUnit::NodeNum.
void llvm::SchedDFSImpl::visitCrossEdge | ( | const SDep & | PredDep, |
const SUnit * | Succ | ||
) | [inline] |
Add a connection for cross edges.
Definition at line 1327 of file ScheduleDAGInstrs.cpp.
References llvm::SDep::getSUnit().
Referenced by llvm::SchedDFSResult::compute().
void llvm::SchedDFSImpl::visitPostorderEdge | ( | const SDep & | PredDep, |
const SUnit * | Succ | ||
) | [inline] |
Called once for each tree edge after calling visitPostOrderNode on the predecessor. Increment the parent node's instruction count and preemptively join this subtree to its parent's if it is small enough.
Definition at line 1320 of file ScheduleDAGInstrs.cpp.
References llvm::SDep::getSUnit(), and llvm::SUnit::NodeNum.
Referenced by llvm::SchedDFSResult::compute().
void llvm::SchedDFSImpl::visitPostorderNode | ( | const SUnit * | SU | ) | [inline] |
Called once for each node after all predecessors are visited. Revisit this node's predecessors and potentially join them now that we know the ILP of the other predecessors.
Definition at line 1277 of file ScheduleDAGInstrs.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SDep::Data, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SUnit::getInstr(), llvm::MachineInstr::isTransient(), llvm::SUnit::NodeNum, and llvm::SUnit::Preds.
Referenced by llvm::SchedDFSResult::compute().
void llvm::SchedDFSImpl::visitPreorder | ( | const SUnit * | SU | ) | [inline] |
Initialize this node's instruction count. We don't need to flag the node visited until visitPostorder because the DAG cannot have cycles.
Definition at line 1269 of file ScheduleDAGInstrs.cpp.
References llvm::SUnit::getInstr(), llvm::MachineInstr::isTransient(), and llvm::SUnit::NodeNum.
Referenced by llvm::SchedDFSResult::compute().