[llvm-commits] [llvm] r157455 - in /llvm/trunk/lib/CodeGen: MachineScheduler.cpp ScoreboardHazardRecognizer.cpp

Andrew Trick atrick at apple.com
Thu May 24 19:02:39 PDT 2012


Author: atrick
Date: Thu May 24 21:02:39 2012
New Revision: 157455

URL: http://llvm.org/viewvc/llvm-project?rev=157455&view=rev
Log:
misched: trace formatting

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

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=157455&r1=157454&r2=157455&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu May 24 21:02:39 2012
@@ -622,8 +622,6 @@
   CurrentBottom = RegionEnd;
   bool IsTopNode = false;
   while (SUnit *SU = SchedImpl->pickNode(IsTopNode)) {
-    DEBUG(dbgs() << "*** " << (IsTopNode ? "Top" : "Bottom")
-          << " Scheduling Instruction");
     if (!checkSchedLimit())
       break;
 
@@ -671,7 +669,6 @@
     }
     SU->isScheduled = true;
     SchedImpl->schedNode(SU, IsTopNode);
-    DEBUG(SU->dump(this));
   }
   assert(CurrentTop == CurrentBottom && "Nonempty unscheduled zone.");
 
@@ -1198,6 +1195,11 @@
     Top.removeReady(SU);
   if (SU->isBottomReady())
     Bot.removeReady(SU);
+
+  DEBUG(dbgs() << "*** " << (IsTopNode ? "Top" : "Bottom")
+        << " Scheduling Instruction in cycle "
+        << (IsTopNode ? Top.CurrCycle : Bot.CurrCycle) << '\n';
+        SU->dump(DAG));
   return SU;
 }
 
@@ -1205,9 +1207,6 @@
 /// that was just returned by pickNode(). However, ScheduleDAGMI needs to update
 /// it's state based on the current cycle before MachineSchedStrategy.
 void ConvergingScheduler::schedNode(SUnit *SU, bool IsTopNode) {
-  DEBUG(dbgs() << " in cycle " << (IsTopNode ? Top.CurrCycle : Bot.CurrCycle)
-        << '\n');
-
   // Update the reservation table.
   if (IsTopNode && Top.HazardRec->isEnabled()) {
     Top.HazardRec->EmitInstruction(SU);

Modified: llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp?rev=157455&r1=157454&r2=157455&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp Thu May 24 21:02:39 2012
@@ -151,7 +151,8 @@
       }
 
       if (!freeUnits) {
-        DEBUG(dbgs() << "*** Hazard in cycle " << (cycle + i) << ", ");
+        DEBUG(dbgs() << "*** Hazard in cycle " << ((cycle+i) < 0 ? "" : "+")
+              << (cycle + i) << ", ");
         DEBUG(dbgs() << "SU(" << SU->NodeNum << "): ");
         DEBUG(DAG->dumpNode(SU));
         return Hazard;





More information about the llvm-commits mailing list