i965/fs: Make the first pre-allocation heuristic be the post heuristic.
authorEric Anholt <eric@anholt.net>
Tue, 19 Nov 2013 21:07:12 +0000 (13:07 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 23 Nov 2013 00:36:27 +0000 (16:36 -0800)
commit46cf80fb366cb14827724a7fea004e81400cc602
tree122db915622540c2c2cd09a163a9c2b9c2027c82
parent09db4940eede4236b47e1328503a719719f5c981
i965/fs: Make the first pre-allocation heuristic be the post heuristic.

I recently made us try two different things that tried to reduce register
pressure so that we would be more likely to allocate successfully.  But
now that we have the logic for trying two, we can make the first thing we
try be the normal, not-prioritizing-register-pressure heuristic.

This means one less scheduling pass in the common case of that heuristic
not producing spills, plus the best schedule we know how to produce, if
that one happens to succeed.  This is important, because our register
allocation produces a lot of possibly avoidable dependencies for the
post-register-allocation schedule, despite ra_set_allocate_round_robin().

GLB2.7: 1.04127% +/- 0.732461% fps improvement (n=31)
nexuiz: No difference (n=5)
lightsmark: 0.838512% +/- 0.300147% fps improvement (n=86)
minecraft apitrace: No difference (n=15)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
src/mesa/drivers/dri/i965/brw_shader.h