mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 12:34:05 +02:00
m1/perf/sched.c (schedule): reduced conditionally compiled code size for optimizer
This commit is contained in:
parent
e98f08e857
commit
2bc4c33814
@ -528,9 +528,7 @@ static int schedule(unsigned int *code)
|
|||||||
int remaining;
|
int remaining;
|
||||||
int i, last, end;
|
int i, last, end;
|
||||||
struct insn *insn;
|
struct insn *insn;
|
||||||
#ifdef LCPF
|
|
||||||
struct insn *best;
|
struct insn *best;
|
||||||
#endif
|
|
||||||
|
|
||||||
remaining = sc->frag->ninstructions;
|
remaining = sc->frag->ninstructions;
|
||||||
for (i = 0; remaining; i++) {
|
for (i = 0; remaining; i++) {
|
||||||
@ -542,9 +540,7 @@ static int schedule(unsigned int *code)
|
|||||||
i, remaining, count(&sc->waiting), count(&sc->ready[i]));
|
i, remaining, count(&sc->waiting), count(&sc->ready[i]));
|
||||||
|
|
||||||
list_concat(&sc->waiting, &sc->ready[i]);
|
list_concat(&sc->waiting, &sc->ready[i]);
|
||||||
#ifdef LCPF
|
|
||||||
best = NULL;
|
best = NULL;
|
||||||
#endif
|
|
||||||
foreach (insn, &sc->waiting) {
|
foreach (insn, &sc->waiting) {
|
||||||
end = i+insn->latency;
|
end = i+insn->latency;
|
||||||
if (end >= PFPU_PROGSIZE)
|
if (end >= PFPU_PROGSIZE)
|
||||||
@ -554,20 +550,16 @@ static int schedule(unsigned int *code)
|
|||||||
if (!best || best->distance < insn->distance)
|
if (!best || best->distance < insn->distance)
|
||||||
best = insn;
|
best = insn;
|
||||||
#else
|
#else
|
||||||
issue(insn, code);
|
best = insn;
|
||||||
list_del(&insn->more);
|
|
||||||
remaining--;
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef LCPF
|
|
||||||
if (best) {
|
if (best) {
|
||||||
issue(best, code);
|
issue(best, code);
|
||||||
list_del(&best->more);
|
list_del(&best->more);
|
||||||
remaining--;
|
remaining--;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (CODE(i).dest)
|
if (CODE(i).dest)
|
||||||
put_reg(sc->pfpu_regs[CODE(i).dest].vm_reg);
|
put_reg(sc->pfpu_regs[CODE(i).dest].vm_reg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user