Fix debug printing of flagged SDNodes in SUnits so that they

print in the correct order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-11-19 00:04:44 +00:00
parent 3a5b020292
commit 06da2bc19f

View File

@ -461,20 +461,20 @@ void ScheduleDAG::Run() {
/// a group of nodes flagged together.
void SUnit::dump(const ScheduleDAG *G) const {
cerr << "SU(" << NodeNum << "): ";
if (getNode())
getNode()->dump(G->DAG);
else
if (getNode()) {
SmallVector<SDNode *, 4> FlaggedNodes;
for (SDNode *N = getNode(); N; N = N->getFlaggedNode())
FlaggedNodes.push_back(N);
while (!FlaggedNodes.empty()) {
cerr << " ";
FlaggedNodes.back()->dump(G->DAG);
cerr << "\n";
FlaggedNodes.pop_back();
}
} else {
cerr << "CROSS RC COPY ";
cerr << "\n";
SmallVector<SDNode *, 4> FlaggedNodes;
for (SDNode *N = getNode()->getFlaggedNode(); N; N = N->getFlaggedNode())
FlaggedNodes.push_back(N);
while (!FlaggedNodes.empty()) {
cerr << " ";
FlaggedNodes.back()->dump(G->DAG);
cerr << "\n";
FlaggedNodes.pop_back();
}
cerr << "\n";
}
void SUnit::dumpAll(const ScheduleDAG *G) const {