aco/spill: skip p_branch in process_block

Fixes compilation of a Dead by Daylight shader.

fossil-db (gfx1100):
Totals from 58 (0.04% of 133461) affected shaders:
Instrs: 319824 -> 319421 (-0.13%); split: -0.13%, +0.00%
CodeSize: 1711260 -> 1708744 (-0.15%); split: -0.15%, +0.00%
SpillSGPRs: 2567 -> 2459 (-4.21%)
Latency: 3274930 -> 3274921 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 924106 -> 924105 (-0.00%); split: -0.00%, +0.00%
Copies: 41883 -> 41757 (-0.30%); split: -0.31%, +0.00%
Branches: 9144 -> 9146 (+0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9599
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24896>
This commit is contained in:
Rhys Perry 2023-08-25 19:21:54 +01:00 committed by Marge Bot
parent 2d98b45086
commit cb096b85ff

View file

@ -1186,6 +1186,15 @@ process_block(spill_ctx& ctx, unsigned block_idx, Block* block, RegisterDemand s
while (idx < block->instructions.size()) {
aco_ptr<Instruction>& instr = block->instructions[idx];
/* Spilling is handled as part of phis (they should always have the same or higher register
* demand). If we try to spill here, we might not be able to reduce the register demand enough
* because there is no path to spill constant/undef phi operands. */
if (instr->opcode == aco_opcode::p_branch) {
instructions.emplace_back(std::move(instr));
idx++;
continue;
}
std::map<Temp, std::pair<Temp, uint32_t>> reloads;
/* rename and reload operands */