forked from OSchip/llvm-project
MachineScheduler: Improve debug messages
Consistenly display available and pending queues immediately before the scheduling choice is done. llvm-svn: 273615
This commit is contained in:
parent
2d3cce71ee
commit
d29d31e30e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue