From 4e7f6a7702520829863f52df0b79be238ed0e36a Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Fri, 25 May 2012 02:02:39 +0000 Subject: [PATCH] misched: trace formatting llvm-svn: 157455 --- llvm/lib/CodeGen/MachineScheduler.cpp | 11 +++++------ llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 4c12c0e..b8eefae 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -622,8 +622,6 @@ void ScheduleDAGMI::schedule() { 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 @@ void ScheduleDAGMI::schedule() { } SU->isScheduled = true; SchedImpl->schedNode(SU, IsTopNode); - DEBUG(SU->dump(this)); } assert(CurrentTop == CurrentBottom && "Nonempty unscheduled zone."); @@ -1198,6 +1195,11 @@ SUnit *ConvergingScheduler::pickNode(bool &IsTopNode) { 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 @@ SUnit *ConvergingScheduler::pickNode(bool &IsTopNode) { /// 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); diff --git a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp index 3d22035..74913b1 100644 --- a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp +++ b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp @@ -151,7 +151,8 @@ ScoreboardHazardRecognizer::getHazardType(SUnit *SU, int Stalls) { } 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; -- 2.7.4