[llvm] r286652 - ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 14:37:26 PST 2016
Author: matze
Date: Fri Nov 11 16:37:26 2016
New Revision: 286652
URL: http://llvm.org/viewvc/llvm-project?rev=286652&view=rev
Log:
ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=286652&r1=286651&r2=286652&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Fri Nov 11 16:37:26 2016
@@ -310,10 +310,20 @@ void SUnit::biasCriticalPath() {
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+static void dumpSUIdentifier(const ScheduleDAG &DAG, const SUnit &SU) {
+ if (&SU == &DAG.ExitSU)
+ dbgs() << "ExitSU";
+ else if (&SU == &DAG.EntrySU)
+ dbgs() << "EntrySU";
+ else
+ dbgs() << "SU(" << SU.NodeNum << ")";
+}
+
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
/// a group of nodes flagged together.
void SUnit::dump(const ScheduleDAG *G) const {
- dbgs() << "SU(" << NodeNum << "): ";
+ dumpSUIdentifier(*G, *this);
+ dbgs() << ": ";
G->dumpNode(this);
}
@@ -342,7 +352,7 @@ void SUnit::dumpAll(const ScheduleDAG *G
case SDep::Output: dbgs() << "out "; break;
case SDep::Order: dbgs() << "ord "; break;
}
- dbgs() << "SU(" << I->getSUnit()->NodeNum << ")";
+ dumpSUIdentifier(*G, *I->getSUnit());
if (I->isArtificial())
dbgs() << " *";
dbgs() << ": Latency=" << I->getLatency();
@@ -362,7 +372,7 @@ void SUnit::dumpAll(const ScheduleDAG *G
case SDep::Output: dbgs() << "out "; break;
case SDep::Order: dbgs() << "ord "; break;
}
- dbgs() << "SU(" << I->getSUnit()->NodeNum << ")";
+ dumpSUIdentifier(*G, *I->getSUnit());
if (I->isArtificial())
dbgs() << " *";
dbgs() << ": Latency=" << I->getLatency();
More information about the llvm-commits
mailing list