[llvm] r282201 - MachineScheduler: Slightly simplify release node
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 14:39:57 PDT 2016
Author: matze
Date: Thu Sep 22 16:39:56 2016
New Revision: 282201
URL: http://llvm.org/viewvc/llvm-project?rev=282201&view=rev
Log:
MachineScheduler: Slightly simplify release node
Modified:
llvm/trunk/include/llvm/CodeGen/MachineScheduler.h
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineScheduler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineScheduler.h?rev=282201&r1=282200&r2=282201&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineScheduler.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineScheduler.h Thu Sep 22 16:39:56 2016
@@ -718,10 +718,6 @@ public:
void releaseNode(SUnit *SU, unsigned ReadyCycle);
- void releaseTopNode(SUnit *SU);
-
- void releaseBottomNode(SUnit *SU);
-
void bumpCycle(unsigned NextCycle);
void incExecutedResources(unsigned PIdx, unsigned Count);
@@ -892,12 +888,18 @@ public:
void schedNode(SUnit *SU, bool IsTopNode) override;
void releaseTopNode(SUnit *SU) override {
- Top.releaseTopNode(SU);
+ if (SU->isScheduled)
+ return;
+
+ Top.releaseNode(SU, SU->TopReadyCycle);
TopCand.SU = nullptr;
}
void releaseBottomNode(SUnit *SU) override {
- Bot.releaseBottomNode(SU);
+ if (SU->isScheduled)
+ return;
+
+ Bot.releaseNode(SU, SU->BotReadyCycle);
BotCand.SU = nullptr;
}
@@ -975,7 +977,9 @@ public:
void schedNode(SUnit *SU, bool IsTopNode) override;
void releaseTopNode(SUnit *SU) override {
- Top.releaseTopNode(SU);
+ if (SU->isScheduled)
+ return;
+ Top.releaseNode(SU, SU->TopReadyCycle);
}
// Only called for roots.
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=282201&r1=282200&r2=282201&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu Sep 22 16:39:56 2016
@@ -1995,20 +1995,6 @@ void SchedBoundary::releaseNode(SUnit *S
Available.push(SU);
}
-void SchedBoundary::releaseTopNode(SUnit *SU) {
- if (SU->isScheduled)
- return;
-
- releaseNode(SU, SU->TopReadyCycle);
-}
-
-void SchedBoundary::releaseBottomNode(SUnit *SU) {
- if (SU->isScheduled)
- return;
-
- releaseNode(SU, SU->BotReadyCycle);
-}
-
/// Move the boundary of scheduled code by one cycle.
void SchedBoundary::bumpCycle(unsigned NextCycle) {
if (SchedModel->getMicroOpBufferSize() == 0) {
More information about the llvm-commits
mailing list