summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-28 19:24:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-28 19:24:24 +0000
commit74d2fd8dd847e0ebccef30e2c5907ff09495d518 (patch)
tree130c52db324cfdeb2013525d2076352a4225824c /lib
parent005ac653f2c8e04fcf95afcecc58ff06b7a3b5ad (diff)
downloadllvm-74d2fd8dd847e0ebccef30e2c5907ff09495d518.tar.gz
llvm-74d2fd8dd847e0ebccef30e2c5907ff09495d518.tar.bz2
llvm-74d2fd8dd847e0ebccef30e2c5907ff09495d518.tar.xz
Trim some unneeded fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp11
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp25
3 files changed, 12 insertions, 26 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 6197b6fa0e..4fdf6a8673 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -941,8 +941,6 @@ void SUnit::dumpAll(const SelectionDAG *G) const {
cerr << " # preds left : " << NumPredsLeft << "\n";
cerr << " # succs left : " << NumSuccsLeft << "\n";
- cerr << " # chain preds left : " << NumChainPredsLeft << "\n";
- cerr << " # chain succs left : " << NumChainSuccsLeft << "\n";
cerr << " Latency : " << Latency << "\n";
cerr << " Depth : " << Depth << "\n";
cerr << " Height : " << Height << "\n";
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
index 33d7910507..369b05c5e9 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
@@ -116,15 +116,12 @@ void ScheduleDAGList::Schedule() {
/// ReleaseSucc - Decrement the NumPredsLeft count of a successor. Add it to
/// the PendingQueue if the count reaches zero.
void ScheduleDAGList::ReleaseSucc(SUnit *SuccSU, bool isChain) {
- if (!isChain)
- SuccSU->NumPredsLeft--;
- else
- SuccSU->NumChainPredsLeft--;
+ SuccSU->NumPredsLeft--;
- assert(SuccSU->NumPredsLeft >= 0 && SuccSU->NumChainPredsLeft >= 0 &&
+ assert(SuccSU->NumPredsLeft >= 0 &&
"List scheduling internal error");
- if ((SuccSU->NumPredsLeft + SuccSU->NumChainPredsLeft) == 0) {
+ if (SuccSU->NumPredsLeft == 0) {
// Compute how many cycles it will be before this actually becomes
// available. This is the max of the start time of all predecessors plus
// their latencies.
@@ -276,7 +273,7 @@ void ScheduleDAGList::ListScheduleTopDown() {
// Verify that all SUnits were scheduled.
bool AnyNotSched = false;
for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
- if (SUnits[i].NumPredsLeft != 0 || SUnits[i].NumChainPredsLeft != 0) {
+ if (SUnits[i].NumPredsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
SUnits[i].dump(&DAG);
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 0b218abd4a..db5ee24e3e 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -202,13 +202,10 @@ void ScheduleDAGRRList::ReleasePred(SUnit *PredSU, bool isChain,
// interrupt model (drain vs. freeze).
PredSU->CycleBound = std::max(PredSU->CycleBound, CurCycle + PredSU->Latency);
- if (!isChain)
- --PredSU->NumSuccsLeft;
- else
- --PredSU->NumChainSuccsLeft;
+ --PredSU->NumSuccsLeft;
#ifndef NDEBUG
- if (PredSU->NumSuccsLeft < 0 || PredSU->NumChainSuccsLeft < 0) {
+ if (PredSU->NumSuccsLeft < 0) {
cerr << "*** List scheduling failed! ***\n";
PredSU->dump(&DAG);
cerr << " has been released too many times!\n";
@@ -216,7 +213,7 @@ void ScheduleDAGRRList::ReleasePred(SUnit *PredSU, bool isChain,
}
#endif
- if ((PredSU->NumSuccsLeft + PredSU->NumChainSuccsLeft) == 0) {
+ if (PredSU->NumSuccsLeft == 0) {
// EntryToken has to go last! Special case it here.
if (!PredSU->Node || PredSU->Node->getOpcode() != ISD::EntryToken) {
PredSU->isAvailable = true;
@@ -287,10 +284,7 @@ void ScheduleDAGRRList::CapturePred(SUnit *PredSU, SUnit *SU, bool isChain) {
AvailableQueue->remove(PredSU);
}
- if (!isChain)
- ++PredSU->NumSuccsLeft;
- else
- ++PredSU->NumChainSuccsLeft;
+ ++PredSU->NumSuccsLeft;
}
/// UnscheduleNodeBottomUp - Remove the node from the schedule, update its and
@@ -713,7 +707,7 @@ void ScheduleDAGRRList::ListScheduleBottomUp() {
// Verify that all SUnits were scheduled.
bool AnyNotSched = false;
for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
- if (SUnits[i].NumSuccsLeft != 0 || SUnits[i].NumChainSuccsLeft != 0) {
+ if (SUnits[i].NumSuccsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
SUnits[i].dump(&DAG);
@@ -739,13 +733,10 @@ void ScheduleDAGRRList::ReleaseSucc(SUnit *SuccSU, bool isChain,
// interrupt model (drain vs. freeze).
SuccSU->CycleBound = std::max(SuccSU->CycleBound, CurCycle + SuccSU->Latency);
- if (!isChain)
- --SuccSU->NumPredsLeft;
- else
- --SuccSU->NumChainPredsLeft;
+ --SuccSU->NumPredsLeft;
#ifndef NDEBUG
- if (SuccSU->NumPredsLeft < 0 || SuccSU->NumChainPredsLeft < 0) {
+ if (SuccSU->NumPredsLeft < 0) {
cerr << "*** List scheduling failed! ***\n";
SuccSU->dump(&DAG);
cerr << " has been released too many times!\n";
@@ -753,7 +744,7 @@ void ScheduleDAGRRList::ReleaseSucc(SUnit *SuccSU, bool isChain,
}
#endif
- if ((SuccSU->NumPredsLeft + SuccSU->NumChainPredsLeft) == 0) {
+ if (SuccSU->NumPredsLeft == 0) {
SuccSU->isAvailable = true;
AvailableQueue->push(SuccSU);
}