class SchedDFSImpl
Declaration
class SchedDFSImpl { /* full declaration omitted */ };
Description
Internal state used to compute SchedDFSResult.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1215
Member Variables
- private llvm::SchedDFSResult& R
- private llvm::IntEqClasses SubtreeClasses
- Join DAG nodes into equivalence classes by their subtree.
- private std::vector<std::pair<const SUnit*, const SUnit*>> ConnectionPairs
- List PredSU, SuccSU pairs that represent data edges between subtrees.
- private SparseSet<llvm::SchedDFSImpl::RootData> RootSet
Method Overview
- public SchedDFSImpl(llvm::SchedDFSResult & r)
- protected void addConnection(unsigned int FromTree, unsigned int ToTree, unsigned int Depth)
- public void finalize()
- public bool isVisited(const llvm::SUnit * SU) const
- protected bool joinPredSubtree(const llvm::SDep & PredDep, const llvm::SUnit * Succ, bool CheckLimit = true)
- public void visitCrossEdge(const llvm::SDep & PredDep, const llvm::SUnit * Succ)
- public void visitPostorderEdge(const llvm::SDep & PredDep, const llvm::SUnit * Succ)
- public void visitPostorderNode(const llvm::SUnit * SU)
- public void visitPreorder(const llvm::SUnit * SU)
Methods
¶SchedDFSImpl(llvm::SchedDFSResult& r)
SchedDFSImpl(llvm::SchedDFSResult& r)
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1238
Parameters
¶void addConnection(unsigned int FromTree,
unsigned int ToTree,
unsigned int Depth)
void addConnection(unsigned int FromTree,
unsigned int ToTree,
unsigned int Depth)
Description
Called by finalize() to record a connection between trees.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1380
Parameters
- unsigned int FromTree
- unsigned int ToTree
- unsigned int Depth
¶void finalize()
void finalize()
Description
Sets each node's subtree ID to the representative ID and record connections between trees.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1316
¶bool isVisited(const llvm::SUnit* SU) const
bool isVisited(const llvm::SUnit* SU) const
Description
Returns 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.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1246
Parameters
- const llvm::SUnit* SU
¶bool joinPredSubtree(const llvm::SDep& PredDep,
const llvm::SUnit* Succ,
bool CheckLimit = true)
bool joinPredSubtree(const llvm::SDep& PredDep,
const llvm::SUnit* Succ,
bool CheckLimit = true)
Description
Joins the predecessor subtree with the successor that is its DFS parent. Applies some heuristics before joining.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1353
Parameters
- const llvm::SDep& PredDep
- const llvm::SUnit* Succ
- bool CheckLimit = true
¶void visitCrossEdge(const llvm::SDep& PredDep,
const llvm::SUnit* Succ)
void visitCrossEdge(const llvm::SDep& PredDep,
const llvm::SUnit* Succ)
Description
Adds a connection for cross edges.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1310
Parameters
- const llvm::SDep& PredDep
- const llvm::SUnit* Succ
¶void visitPostorderEdge(const llvm::SDep& PredDep,
const llvm::SUnit* Succ)
void visitPostorderEdge(const llvm::SDep& PredDep,
const llvm::SUnit* Succ)
Description
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.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1303
Parameters
- const llvm::SDep& PredDep
- const llvm::SUnit* Succ
¶void visitPostorderNode(const llvm::SUnit* SU)
void visitPostorderNode(const llvm::SUnit* SU)
Description
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.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1261
Parameters
- const llvm::SUnit* SU
¶void visitPreorder(const llvm::SUnit* SU)
void visitPreorder(const llvm::SUnit* SU)
Description
Initializes this node's instruction count. We don't need to flag the node visited until visitPostorder because the DAG cannot have cycles.
Declared at: llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:1253
Parameters
- const llvm::SUnit* SU