summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-11 22:37:26 +0000
committerMatthias Braun <matze@braunis.de>2016-11-11 22:37:26 +0000
commit636a5972a9fe0c9e4309f402b436cef172ac1b6f (patch)
treed64397f6b88f10fe6fec266da6cffee6f1676b08 /llvm/lib/CodeGen/ScheduleDAG.cpp
parentded92a9274f80ee803cac1ba46824d8114b83837 (diff)
downloadbcm5719-llvm-636a5972a9fe0c9e4309f402b436cef172ac1b6f.tar.gz
bcm5719-llvm-636a5972a9fe0c9e4309f402b436cef172ac1b6f.zip
ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
llvm-svn: 286652
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAG.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp
index e139df93fe9..1f0c3283ceb 100644
--- a/llvm/lib/CodeGen/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAG.cpp
@@ -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) const {
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) const {
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();
OpenPOWER on IntegriCloud