mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
misched: avoid scheduling an instruction twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165416 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -495,6 +495,7 @@ void ScheduleDAGMI::schedule() {
|
|||||||
|
|
||||||
bool IsTopNode = false;
|
bool IsTopNode = false;
|
||||||
while (SUnit *SU = SchedImpl->pickNode(IsTopNode)) {
|
while (SUnit *SU = SchedImpl->pickNode(IsTopNode)) {
|
||||||
|
assert(!SU->isScheduled && "Node already scheduled");
|
||||||
if (!checkSchedLimit())
|
if (!checkSchedLimit())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1119,6 +1120,7 @@ SUnit *ConvergingScheduler::pickNode(bool &IsTopNode) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
SUnit *SU;
|
SUnit *SU;
|
||||||
|
do {
|
||||||
if (ForceTopDown) {
|
if (ForceTopDown) {
|
||||||
SU = Top.pickOnlyChoice();
|
SU = Top.pickOnlyChoice();
|
||||||
if (!SU) {
|
if (!SU) {
|
||||||
@ -1146,6 +1148,8 @@ SUnit *ConvergingScheduler::pickNode(bool &IsTopNode) {
|
|||||||
else {
|
else {
|
||||||
SU = pickNodeBidrectional(IsTopNode);
|
SU = pickNodeBidrectional(IsTopNode);
|
||||||
}
|
}
|
||||||
|
} while (SU->isScheduled);
|
||||||
|
|
||||||
if (SU->isTopReady())
|
if (SU->isTopReady())
|
||||||
Top.removeReady(SU);
|
Top.removeReady(SU);
|
||||||
if (SU->isBottomReady())
|
if (SU->isBottomReady())
|
||||||
|
Reference in New Issue
Block a user