[llvm] r190179 - mi-sched: print tree size in -view-misched-dags

Andrew Trick atrick at apple.com
Fri Sep 6 10:32:42 PDT 2013


Author: atrick
Date: Fri Sep  6 12:32:42 2013
New Revision: 190179

URL: http://llvm.org/viewvc/llvm-project?rev=190179&view=rev
Log:
mi-sched: print tree size in -view-misched-dags

Modified:
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=190179&r1=190178&r2=190179&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Fri Sep  6 12:32:42 2013
@@ -3064,7 +3064,11 @@ struct DOTGraphTraits<ScheduleDAGMI*> :
   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) {





More information about the llvm-commits mailing list