Date:2011-09-21 22:57:20 (7 years 11 months ago)
Author:Werner Almesberger
Commit:2bc4c33814b1b9f9da92c6d4ad6dddc4dcc87bd4
Message:m1/perf/sched.c (schedule): reduced conditionally compiled code size for optimizer

Files: m1/perf/sched.c (3 diffs)

Change Details

m1/perf/sched.c
528528    int remaining;
529529    int i, last, end;
530530    struct insn *insn;
531#ifdef LCPF
532531    struct insn *best;
533#endif
534532
535533    remaining = sc->frag->ninstructions;
536534    for (i = 0; remaining; i++) {
...... 
542540            i, remaining, count(&sc->waiting), count(&sc->ready[i]));
543541
544542        list_concat(&sc->waiting, &sc->ready[i]);
545#ifdef LCPF
546543        best = NULL;
547#endif
548544        foreach (insn, &sc->waiting) {
549545            end = i+insn->latency;
550546            if (end >= PFPU_PROGSIZE)
...... 
554550                if (!best || best->distance < insn->distance)
555551                    best = insn;
556552#else
557                issue(insn, code);
558                list_del(&insn->more);
559                remaining--;
553                best = insn;
560554                break;
561555#endif
562556            }
563557        }
564#ifdef LCPF
565558        if (best) {
566559            issue(best, code);
567560            list_del(&best->more);
568561            remaining--;
569562        }
570#endif
571563        if (CODE(i).dest)
572564            put_reg(sc->pfpu_regs[CODE(i).dest].vm_reg);
573565    }

Archive Download the corresponding diff file

Branches:
master



interactive