aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-06-23 21:27:38 +0000
committerMatthias Braun <matze@braunis.de>2016-06-23 21:27:38 +0000
commitd29d31e30ef67b0d465160c1f07d5b6fc6bf88dd (patch)
tree63b16b8a91112c4c4abb2260a070b4c3e38b3c99 /llvm/lib/CodeGen/MachineScheduler.cpp
parent2d3cce71eeb929efbab95466ba3847ea8e3d09c1 (diff)
downloadllvm-d29d31e30ef67b0d465160c1f07d5b6fc6bf88dd.zip
llvm-d29d31e30ef67b0d465160c1f07d5b6fc6bf88dd.tar.gz
llvm-d29d31e30ef67b0d465160c1f07d5b6fc6bf88dd.tar.bz2
MachineScheduler: Improve debug messages
Consistenly display available and pending queues immediately before the scheduling choice is done. llvm-svn: 273615
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index f3b40d3..bb1cea7 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2258,6 +2258,10 @@ SUnit *SchedBoundary::pickOnlyChoice() {
bumpCycle(CurrCycle + 1);
releasePending();
}
+
+ DEBUG(Pending.dump());
+ DEBUG(Available.dump());
+
if (Available.size() == 1)
return *Available.begin();
return nullptr;
@@ -2886,13 +2890,10 @@ void GenericScheduler::tryCandidate(SchedCandidate &Cand,
void GenericScheduler::pickNodeFromQueue(SchedBoundary &Zone,
const RegPressureTracker &RPTracker,
SchedCandidate &Cand) {
- ReadyQueue &Q = Zone.Available;
-
- DEBUG(Q.dump());
-
// getMaxPressureDelta temporarily modifies the tracker.
RegPressureTracker &TempTracker = const_cast<RegPressureTracker&>(RPTracker);
+ ReadyQueue &Q = Zone.Available;
for (ReadyQueue::iterator I = Q.begin(), E = Q.end(); I != E; ++I) {
SchedCandidate TryCand(Cand.Policy);
@@ -2933,6 +2934,7 @@ SUnit *GenericScheduler::pickNodeBidirectional(bool &IsTopNode) {
setPolicy(TopCand.Policy, /*IsPostRA=*/false, Top, &Bot);
// Prefer bottom scheduling when heuristics are silent.
+ DEBUG(dbgs() << "Picking from Bot:\n");
pickNodeFromQueue(Bot, DAG->getBotRPTracker(), BotCand);
assert(BotCand.Reason != NoCand && "failed to find the first candidate");
@@ -2951,6 +2953,7 @@ SUnit *GenericScheduler::pickNodeBidirectional(bool &IsTopNode) {
return BotCand.SU;
}
// Check if the top Q has a better candidate.
+ DEBUG(dbgs() << "Picking from Top:\n");
pickNodeFromQueue(Top, DAG->getTopRPTracker(), TopCand);
assert(TopCand.Reason != NoCand && "failed to find the first candidate");
@@ -3160,9 +3163,6 @@ void PostGenericScheduler::tryCandidate(SchedCandidate &Cand,
void PostGenericScheduler::pickNodeFromQueue(SchedCandidate &Cand) {
ReadyQueue &Q = Top.Available;
-
- DEBUG(Q.dump());
-
for (ReadyQueue::iterator I = Q.begin(), E = Q.end(); I != E; ++I) {
SchedCandidate TryCand(Cand.Policy);
TryCand.SU = *I;