v3d: Rotate through registers to improve post-RA scheduling options.
authorEric Anholt <eric@anholt.net>
Fri, 20 Jul 2018 19:05:57 +0000 (12:05 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 23 Jul 2018 17:21:42 +0000 (10:21 -0700)
commit8dfc6ee317dd01016a26f1fb21829b89277e59d7
treedb9a0c54ebbebab31d176339be390c8dae9b74f1
parent1fb31819ae8ac2baee9361538d509c2a4aae7dac
v3d: Rotate through registers to improve post-RA scheduling options.

Similarly to VC4's implementation, by not picking r0 immediately upon
freeing it, we give the scheduler more of a chance to fit later writes in
earlier.  I'm not clear on whether there's any real cost to picking phys
over accumulators, so keep that behavior for now.

shader-db:
total instructions in shared programs: 96831 -> 95669 (-1.20%)
instructions in affected programs:     77254 -> 76092 (-1.50%)
src/broadcom/compiler/vir_register_allocate.c