[llvm-commits] [llvm] r78687 - in /llvm/trunk/lib/CodeGen: PostRASchedulerList.cpp ScheduleDAG.cpp

David Goodwin david_goodwin at apple.com
Tue Aug 11 10:35:25 PDT 2009


Author: david_goodwin
Date: Tue Aug 11 12:35:23 2009
New Revision: 78687

URL: http://llvm.org/viewvc/llvm-project?rev=78687&view=rev
Log:
Add some debug output.

Modified:
    llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
    llvm/trunk/lib/CodeGen/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=78687&r1=78686&r2=78687&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Tue Aug 11 12:35:23 2009
@@ -557,7 +557,7 @@
   // 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 @@
       } 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;

Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=78687&r1=78686&r2=78687&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Tue Aug 11 12:35:23 2009
@@ -285,6 +285,7 @@
       errs() << I->getSUnit() << " - SU(" << I->getSUnit()->NodeNum << ")";
       if (I->isArtificial())
         errs() << " *";
+      errs() << ": Latency=" << I->getLatency();
       errs() << "\n";
     }
   }
@@ -303,6 +304,7 @@
       errs() << I->getSUnit() << " - SU(" << I->getSUnit()->NodeNum << ")";
       if (I->isArtificial())
         errs() << " *";
+      errs() << ": Latency=" << I->getLatency();
       errs() << "\n";
     }
   }





More information about the llvm-commits mailing list