mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
misched: Use the same scheduling heuristics with -misched-topdown/bottomup.
(except the part about choosing direction) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b1ebd6981f
commit
8ddd9d5b2b
@ -1168,11 +1168,25 @@ SUnit *ConvergingScheduler::pickNode(bool &IsTopNode) {
|
|||||||
}
|
}
|
||||||
SUnit *SU;
|
SUnit *SU;
|
||||||
if (ForceTopDown) {
|
if (ForceTopDown) {
|
||||||
SU = DAG->getSUnit(DAG->top());
|
SU = Top.pickOnlyChoice();
|
||||||
|
if (!SU) {
|
||||||
|
SchedCandidate TopCand;
|
||||||
|
CandResult TopResult =
|
||||||
|
pickNodeFromQueue(Top.Available, DAG->getTopRPTracker(), TopCand);
|
||||||
|
assert(TopResult != NoCand && "failed to find the first candidate");
|
||||||
|
SU = TopCand.SU;
|
||||||
|
}
|
||||||
IsTopNode = true;
|
IsTopNode = true;
|
||||||
}
|
}
|
||||||
else if (ForceBottomUp) {
|
else if (ForceBottomUp) {
|
||||||
SU = DAG->getSUnit(priorNonDebug(DAG->bottom(), DAG->top()));
|
SU = Bot.pickOnlyChoice();
|
||||||
|
if (!SU) {
|
||||||
|
SchedCandidate BotCand;
|
||||||
|
CandResult BotResult =
|
||||||
|
pickNodeFromQueue(Bot.Available, DAG->getBotRPTracker(), BotCand);
|
||||||
|
assert(BotResult != NoCand && "failed to find the first candidate");
|
||||||
|
SU = BotCand.SU;
|
||||||
|
}
|
||||||
IsTopNode = false;
|
IsTopNode = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user