mi-sched: print tree size in -view-misched-dags
authorAndrew Trick <atrick@apple.com>
Fri, 6 Sep 2013 17:32:42 +0000 (17:32 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 6 Sep 2013 17:32:42 +0000 (17:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineScheduler.cpp

index 2a5881e7e6e97abc50c0395514772b16eb7debbc..274fb0ef94be0f732a5d82b8b75830616ad10175 100644 (file)
@@ -3064,7 +3064,11 @@ struct DOTGraphTraits<ScheduleDAGMI*> : public DefaultDOTGraphTraits {
   static std::string getNodeLabel(const SUnit *SU, const ScheduleDAG *G) {
     std::string Str;
     raw_string_ostream SS(Str);
-    SS << "SU(" << SU->NodeNum << ')';
+    const SchedDFSResult *DFS =
+      static_cast<const ScheduleDAGMI*>(G)->getDFSResult();
+    SS << "SU:" << SU->NodeNum;
+    if (DFS)
+      SS << " I:" << DFS->getNumInstrs(SU);
     return SS.str();
   }
   static std::string getNodeDescription(const SUnit *SU, const ScheduleDAG *G) {