ir3: fix various spilling bugs
This series fixes various spilling bugs discovered while trying to get IR3_SHADER_DEBUG=spillall
working on shader-db and CTS. See the individual commit messages for the specific bugs that were fixed.
This series also contains the introduction of a new ir3_cursor
/ir3_builder
API, mirroring the API found in NIR for inserting instructions. The reason for introducing this now is that ir3_spill.c
contained many functions to create instructions that used an ir3_instruction
pointer to indicate where it should be inserted: before the instruction if set, at the end of the block if NULL
. One of the bug fixes needed to insert instructions at the beginning of blocks which was impossible to express properly with the current design. Using the new ir3_cursor
makes this easy.