mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 13:56:22 +02:00
m1/perf/sched.c: tried and rejected more accurate LCPF distance heuristics
They turned out to produce the same or even slightly worse results.
This commit is contained in:
parent
9db83ae72c
commit
bb8c1ce741
@ -423,9 +423,31 @@ static void init_scheduler(struct fpvm_fragment *frag)
|
|||||||
|
|
||||||
for (i = frag->ninstructions-1; i >= 0; i--) {
|
for (i = frag->ninstructions-1; i >= 0; i--) {
|
||||||
insn = sc->insns+i;
|
insn = sc->insns+i;
|
||||||
|
#if 0
|
||||||
|
/*
|
||||||
|
* Theoretically, we should consider the distance through
|
||||||
|
* write-write dependencies too. In practice, this would
|
||||||
|
* mainly matter if we had operations whose result is ignored.
|
||||||
|
* This is a degenerate case that's probably not worth
|
||||||
|
* spending much effort on.
|
||||||
|
*/
|
||||||
|
if (insn->next_setter) {
|
||||||
|
insn->distance =
|
||||||
|
insn->next_setter->distance-insn->distance+1;
|
||||||
|
if (insn->distance < 1)
|
||||||
|
insn->distance = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
foreach (dep, &insn->dependants)
|
foreach (dep, &insn->dependants)
|
||||||
if (dep->insn->distance > insn->distance)
|
if (dep->insn->distance > insn->distance)
|
||||||
insn->distance = dep->insn->distance;
|
insn->distance = dep->insn->distance;
|
||||||
|
/*
|
||||||
|
* While it wold be more correct to add one for the cycle
|
||||||
|
* following the write cycle, this also has the effect of
|
||||||
|
* producing slighly worse results on the example set of
|
||||||
|
* patches. Let's thus keep this "bug" for now.
|
||||||
|
*/
|
||||||
|
// insn->distance += insn->latency+1;
|
||||||
insn->distance += insn->latency;
|
insn->distance += insn->latency;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user