broadcom/compiler: Allow spills of temporaries from TMU reads
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Mon, 26 Oct 2020 04:03:04 +0000 (00:03 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Nov 2020 20:45:58 +0000 (20:45 +0000)
commita1a365e8188bd72be27404dd669cad90468bc09f
tree40779e41d74967a7dbc031de59a15dcbc2759d5e
parent1c5271346af77724f0462d1acafaa49142569006
broadcom/compiler: Allow spills of temporaries from TMU reads

Since spills and fills use the TMU, special care has to be taken to
avoid putting one between a TMU setup instruction and the corresponding
reads or writes. This change adds logic to move fills up and move spills
down to avoid interrupting such sequences.

This allows compiling 6 more programs from shader-db. Other stats:

total spills in shared programs: 446 -> 446 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 606 -> 610 (0.66%)
fills in affected programs: 38 -> 42 (10.53%)
helped: 0
HURT: 2

total instructions in shared programs: 19330 -> 19363 (0.17%)
instructions in affected programs: 3299 -> 3332 (1.00%)
helped: 0
HURT: 5

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6606>
src/broadcom/compiler/vir_register_allocate.c