1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-18 17:19:47 +02:00

m1/perf/sched.c (schedule): reduced conditionally compiled code size for optimizer

This commit is contained in:
Werner Almesberger 2011-09-21 17:57:20 -03:00
parent e98f08e857
commit 2bc4c33814

View File

@ -528,9 +528,7 @@ static int schedule(unsigned int *code)
int remaining;
int i, last, end;
struct insn *insn;
#ifdef LCPF
struct insn *best;
#endif
remaining = sc->frag->ninstructions;
for (i = 0; remaining; i++) {
@ -542,9 +540,7 @@ static int schedule(unsigned int *code)
i, remaining, count(&sc->waiting), count(&sc->ready[i]));
list_concat(&sc->waiting, &sc->ready[i]);
#ifdef LCPF
best = NULL;
#endif
foreach (insn, &sc->waiting) {
end = i+insn->latency;
if (end >= PFPU_PROGSIZE)
@ -554,20 +550,16 @@ static int schedule(unsigned int *code)
if (!best || best->distance < insn->distance)
best = insn;
#else
issue(insn, code);
list_del(&insn->more);
remaining--;
best = insn;
break;
#endif
}
}
#ifdef LCPF
if (best) {
issue(best, code);
list_del(&best->more);
remaining--;
}
#endif
if (CODE(i).dest)
put_reg(sc->pfpu_regs[CODE(i).dest].vm_reg);
}