Skip to content

ir3/spill: Initial implementation of rematerialization

Connor Abbott requested to merge cwabbott0/mesa:review/ir3-spill-remat into main

The motivation for this is that dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_geom is currently failing because it has the problem described in #5595 and it's so bad that we run out of spill slots indexable via immediate offsets (and trying to expand that is painful). This MR fixes any problem with spilling caused by deficiencies in the scheduler around immediates, and also handles inter-block problems, by adding basic rematerialization to the RA spiller. The pro here is that it's more general than anything we could do in the scheduler, but the con is that we can't spill preemptively to reduce register pressure and so we can still wind up using more registers than necessary. Therefore I think that we might want to revisit #5595 in the future if something other than CTS has this pattern, but at least this guarantees that something silly like this won't happen again.

Merge request reports