diff options
author | Alexander Belyaev <pifon@google.com> | 2020-09-21 13:18:39 +0200 |
---|---|---|
committer | Alexander Belyaev <pifon@google.com> | 2020-09-21 13:33:05 +0200 |
commit | 17dc729bd42947b839c9717a2efa9e1e04248616 (patch) | |
tree | 08947f922a48fa8e05f971fff02221b664783e44 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | af29591650c43bd3bdc380c9d47b8bfd0f1664a2 (diff) | |
download | llvm-17dc729bd42947b839c9717a2efa9e1e04248616.zip llvm-17dc729bd42947b839c9717a2efa9e1e04248616.tar.gz llvm-17dc729bd42947b839c9717a2efa9e1e04248616.tar.bz2 |
Revert "[NFC][ScheduleDAG] Remove unused EntrySU SUnit"
This reverts commit 0345d88de654259ae90494bf9b015416e2cccacb.
Google internal backend uses EntrySU, we are looking into removing
dependency on it.
Differential Revision: https://reviews.llvm.org/D88018
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index dbb2f3f..b6d0d9a 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -680,7 +680,7 @@ void ScheduleDAGMI::releasePred(SUnit *SU, SDep *PredEdge) { PredSU->BotReadyCycle = SU->BotReadyCycle + PredEdge->getLatency(); --PredSU->NumSuccsLeft; - if (PredSU->NumSuccsLeft == 0) + if (PredSU->NumSuccsLeft == 0 && PredSU != &EntrySU) SchedImpl->releaseBottomNode(PredSU); } @@ -853,7 +853,7 @@ void ScheduleDAGMI::initQueues(ArrayRef<SUnit*> TopRoots, NextClusterSucc = nullptr; NextClusterPred = nullptr; - // Release all DAG roots for scheduling, not including ExitSU. + // Release all DAG roots for scheduling, not including EntrySU/ExitSU. // // Nodes with unreleased weak edges can still be roots. // Release top roots in forward order. @@ -867,6 +867,7 @@ void ScheduleDAGMI::initQueues(ArrayRef<SUnit*> TopRoots, SchedImpl->releaseBottomNode(*I); } + releaseSuccessors(&EntrySU); releasePredecessors(&ExitSU); SchedImpl->registerRoots(); @@ -1167,6 +1168,8 @@ void ScheduleDAGMILive::updatePressureDiffs( void ScheduleDAGMILive::dump() const { #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) + if (EntrySU.getInstr() != nullptr) + dumpNodeAll(EntrySU); for (const SUnit &SU : SUnits) { dumpNodeAll(SU); if (ShouldTrackPressure) { |