diff options
author | Connor Abbott <[email protected]> | 2018-01-11 18:35:58 -0500 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-07-18 14:33:23 +0200 |
commit | 54434fe67068d9abdf73bfc3482337cc4315d2d3 (patch) | |
tree | 70ae5fa227540a1f2aa450190cd1a41378c7d843 /src/gallium/drivers/lima/meson.build | |
parent | 12645e8714d92f40b0da9d2e70022f7444860303 (diff) |
lima/gpir: Rework the scheduler
Now, we do scheduling at the same time as value register allocation. The
ready list now acts similarly to the array of registers in
value_regalloc, keeping us from running out of slots. Before this, the
value register allocator wasn't aware of the scheduling constraints of
the actual machine, which meant that it sometimes chose the wrong false
dependencies to insert. Now, we assign value registers at the same time
as we actually schedule instructions, making its choices reflect reality
much better. It was also conservative in some cases where the new scheme
doesn't have to be. For example, in something like:
1 = ld_att
2 = ld_uni
3 = add 1, 2
It's possible that one of 1 and 2 can't be scheduled in the same
instruction as 3, meaning that a move needs to be inserted, so the value
register allocator needs to assume that this sequence requires two
registers. But when actually scheduling, we could discover that 1, 2,
and 3 can all be scheduled together, so that they only require one
register. The new scheduler speculatively inserts the instruction under
consideration, as well as all of its child load instructions, and then
counts the number of live value registers after all is said and done.
This lets us be more aggressive with scheduling when we're close to the
limit.
With the new scheduler, the kmscube vertex shader is now scheduled in 40
instructions, versus 66 before.
Acked-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/meson.build')
-rw-r--r-- | src/gallium/drivers/lima/meson.build | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/meson.build b/src/gallium/drivers/lima/meson.build index 1db8c7ea8f9..0f13b9c7272 100644 --- a/src/gallium/drivers/lima/meson.build +++ b/src/gallium/drivers/lima/meson.build @@ -29,8 +29,7 @@ files_lima = files( 'ir/gp/codegen.h', 'ir/gp/codegen.c', 'ir/gp/reduce_scheduler.c', - 'ir/gp/value_regalloc.c', - 'ir/gp/physical_regalloc.c', + 'ir/gp/regalloc.c', 'ir/gp/disasm.c', 'ir/pp/ppir.h', |