Add some debug output.
authorDavid Goodwin <david_goodwin@apple.com>
Tue, 11 Aug 2009 17:35:23 +0000 (17:35 +0000)
committerDavid Goodwin <david_goodwin@apple.com>
Tue, 11 Aug 2009 17:35:23 +0000 (17:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78687 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/ScheduleDAG.cpp

index 4b265cc559726ae3d13bd9be3ddc675d70b57a48..1606532e47fe8145feadf876f093cbe3ec654a8a 100644 (file)
@@ -557,7 +557,7 @@ bool SchedulePostRATDList::BreakAntiDependencies() {
   // isn't A which is free.  This re-introduces anti-dependencies
   // at all but one of the original anti-dependencies that we were
   // trying to break.  To avoid this, keep track of the most recent
-  // register that each register was replaced with, avoid avoid
+  // register that each register was replaced with, avoid
   // using it to repair an anti-dependence on the same register.
   // This lets us produce this:
   //   A = ...
@@ -825,7 +825,19 @@ void SchedulePostRATDList::ListScheduleTopDown() {
       } else if (PendingQueue[i]->getDepth() < MinDepth)
         MinDepth = PendingQueue[i]->getDepth();
     }
-    
+
+#ifndef NDEBUG
+    {
+      errs() << "\n*** Examining Available\n";
+      LatencyPriorityQueue q = AvailableQueue;
+      while (!q.empty()) {
+        SUnit *su = q.pop();
+        errs() << "Height " << su->getHeight() << ": ";
+        su->dump(this);
+      }
+    }
+#endif
+
     SUnit *FoundSUnit = 0;
 
     bool HasNoopHazards = false;
index bc48dc21ab17c6d3c5c8300f8828122a0b56d7c5..a7508b5042ddff562c1227d185993e63ac95e866 100644 (file)
@@ -285,6 +285,7 @@ void SUnit::dumpAll(const ScheduleDAG *G) const {
       errs() << I->getSUnit() << " - SU(" << I->getSUnit()->NodeNum << ")";
       if (I->isArtificial())
         errs() << " *";
+      errs() << ": Latency=" << I->getLatency();
       errs() << "\n";
     }
   }
@@ -303,6 +304,7 @@ void SUnit::dumpAll(const ScheduleDAG *G) const {
       errs() << I->getSUnit() << " - SU(" << I->getSUnit()->NodeNum << ")";
       if (I->isArtificial())
         errs() << " *";
+      errs() << ": Latency=" << I->getLatency();
       errs() << "\n";
     }
   }