[llvm-commits] [llvm] r59488 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Dan Gohman
gohman at apple.com
Mon Nov 17 18:06:40 PST 2008
Author: djg
Date: Mon Nov 17 20:06:40 2008
New Revision: 59488
URL: http://llvm.org/viewvc/llvm-project?rev=59488&view=rev
Log:
Change SUnit's dump method to take a ScheduleDAG* instead of
a SelectionDAG*.
Modified:
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=59488&r1=59487&r2=59488&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Nov 17 20:06:40 2008
@@ -29,6 +29,7 @@
class MachineRegisterInfo;
class MachineInstr;
class TargetRegisterInfo;
+ class ScheduleDAG;
class SelectionDAG;
class SelectionDAGISel;
class TargetInstrInfo;
@@ -239,8 +240,8 @@
return false;
}
- void dump(const SelectionDAG *G) const;
- void dumpAll(const SelectionDAG *G) const;
+ void dump(const ScheduleDAG *G) const;
+ void dumpAll(const ScheduleDAG *G) const;
};
//===--------------------------------------------------------------------===//
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=59488&r1=59487&r2=59488&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Nov 17 20:06:40 2008
@@ -440,7 +440,7 @@
void ScheduleDAG::dumpSchedule() const {
for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
if (SUnit *SU = Sequence[i])
- SU->dump(DAG);
+ SU->dump(this);
else
cerr << "**** NOOP ****\n";
}
@@ -459,10 +459,10 @@
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
/// a group of nodes flagged together.
-void SUnit::dump(const SelectionDAG *G) const {
+void SUnit::dump(const ScheduleDAG *G) const {
cerr << "SU(" << NodeNum << "): ";
if (getNode())
- getNode()->dump(G);
+ getNode()->dump(G->DAG);
else
cerr << "CROSS RC COPY ";
cerr << "\n";
@@ -471,13 +471,13 @@
FlaggedNodes.push_back(N);
while (!FlaggedNodes.empty()) {
cerr << " ";
- FlaggedNodes.back()->dump(G);
+ FlaggedNodes.back()->dump(G->DAG);
cerr << "\n";
FlaggedNodes.pop_back();
}
}
-void SUnit::dumpAll(const SelectionDAG *G) const {
+void SUnit::dumpAll(const ScheduleDAG *G) const {
dump(G);
cerr << " # preds left : " << NumPredsLeft << "\n";
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=59488&r1=59487&r2=59488&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Mon Nov 17 20:06:40 2008
@@ -125,7 +125,7 @@
BuildSchedUnits();
DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
- SUnits[su].dumpAll(DAG));
+ SUnits[su].dumpAll(this));
// Execute the actual scheduling loop.
ListScheduleBottomUp();
@@ -143,7 +143,7 @@
#ifndef NDEBUG
if (PredSU->NumSuccsLeft < 0) {
cerr << "*** Scheduling failed! ***\n";
- PredSU->dump(DAG);
+ PredSU->dump(this);
cerr << " has been released too many times!\n";
assert(0);
}
@@ -160,7 +160,7 @@
/// the Available queue.
void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
DOUT << "*** Scheduling [" << CurCycle << "]: ";
- DEBUG(SU->dump(DAG));
+ DEBUG(SU->dump(this));
SU->Cycle = CurCycle;
// Bottom up: release predecessors
@@ -613,14 +613,14 @@
}
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has not been scheduled!\n";
AnyNotSched = true;
}
if (SUnits[i].NumSuccsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has successors left!\n";
AnyNotSched = true;
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp?rev=59488&r1=59487&r2=59488&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp Mon Nov 17 20:06:40 2008
@@ -113,7 +113,7 @@
#ifndef NDEBUG
if (SuccSU->NumPredsLeft < 0) {
cerr << "*** Scheduling failed! ***\n";
- SuccSU->dump(DAG);
+ SuccSU->dump(this);
cerr << " has been released too many times!\n";
assert(0);
}
@@ -142,7 +142,7 @@
/// the Available queue.
void ScheduleDAGList::ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
DOUT << "*** Scheduling [" << CurCycle << "]: ";
- DEBUG(SU->dump(DAG));
+ DEBUG(SU->dump(this));
Sequence.push_back(SU);
SU->Cycle = CurCycle;
@@ -267,7 +267,7 @@
if (SUnits[i].NumPredsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has not been scheduled!\n";
AnyNotSched = true;
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=59488&r1=59487&r2=59488&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Mon Nov 17 20:06:40 2008
@@ -186,7 +186,7 @@
BuildSchedUnits();
DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
- SUnits[su].dumpAll(DAG));
+ SUnits[su].dumpAll(this));
if (!Fast) {
CalculateDepths();
CalculateHeights();
@@ -271,7 +271,7 @@
#ifndef NDEBUG
if (PredSU->NumSuccsLeft < 0) {
cerr << "*** Scheduling failed! ***\n";
- PredSU->dump(DAG);
+ PredSU->dump(this);
cerr << " has been released too many times!\n";
assert(0);
}
@@ -301,7 +301,7 @@
/// the Available queue.
void ScheduleDAGRRList::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
DOUT << "*** Scheduling [" << CurCycle << "]: ";
- DEBUG(SU->dump(DAG));
+ DEBUG(SU->dump(this));
SU->Cycle = CurCycle;
AvailableQueue->ScheduledNode(SU);
@@ -368,7 +368,7 @@
/// its predecessor states to reflect the change.
void ScheduleDAGRRList::UnscheduleNodeBottomUp(SUnit *SU) {
DOUT << "*** Unscheduling [" << SU->Cycle << "]: ";
- DEBUG(SU->dump(DAG));
+ DEBUG(SU->dump(this));
AvailableQueue->UnscheduledNode(SU);
@@ -1084,14 +1084,14 @@
}
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has not been scheduled!\n";
AnyNotSched = true;
}
if (SUnits[i].NumSuccsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has successors left!\n";
AnyNotSched = true;
}
@@ -1117,7 +1117,7 @@
#ifndef NDEBUG
if (SuccSU->NumPredsLeft < 0) {
cerr << "*** Scheduling failed! ***\n";
- SuccSU->dump(DAG);
+ SuccSU->dump(this);
cerr << " has been released too many times!\n";
assert(0);
}
@@ -1148,7 +1148,7 @@
/// the Available queue.
void ScheduleDAGRRList::ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
DOUT << "*** Scheduling [" << CurCycle << "]: ";
- DEBUG(SU->dump(DAG));
+ DEBUG(SU->dump(this));
SU->Cycle = CurCycle;
Sequence.push_back(SU);
@@ -1213,14 +1213,14 @@
}
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has not been scheduled!\n";
AnyNotSched = true;
}
if (SUnits[i].NumPredsLeft != 0) {
if (!AnyNotSched)
cerr << "*** List scheduling failed! ***\n";
- SUnits[i].dump(DAG);
+ SUnits[i].dump(this);
cerr << "has predecessors left!\n";
AnyNotSched = true;
}
More information about the llvm-commits
mailing list