diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/CodeGen/ScheduleDAG.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp index dc3a11670a16..60f8eec1b9bc 100644 --- a/llvm/lib/CodeGen/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/ScheduleDAG.cpp @@ -713,6 +713,14 @@ bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *TargetSU, SUnit *SU) { return false; } +void ScheduleDAGTopologicalSort::AddSUnitWithoutPredecessors(const SUnit *SU) { + assert(SU->NodeNum == Index2Node.size() && "Node cannot be added at the end"); + assert(SU->NumPreds == 0 && "Can only add SU's with no predecessors"); + Node2Index.push_back(Index2Node.size()); + Index2Node.push_back(SU->NodeNum); + Visited.resize(Node2Index.size()); +} + bool ScheduleDAGTopologicalSort::IsReachable(const SUnit *SU, const SUnit *TargetSU) { FixOrder(); |