aco/ra: don't immediately assign a register for p_branch

These get now assigned after handling phis.

Totals from 564 (0.42% of 134913) affected shaders: (GFX10.3)
CodeSize: 5519744 -> 5515308 (-0.08%)
Instrs: 1063045 -> 1061936 (-0.10%)
Latency: 11880452 -> 11875904 (-0.04%)
InvThroughput: 2259933 -> 2259581 (-0.02%); split: -0.02%, +0.00%
Copies: 86908 -> 85799 (-1.28%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13432>
This commit is contained in:
Daniel Schürmann 2022-03-03 00:52:06 +01:00 committed by Marge Bot
parent c3070773f8
commit ccf4bcd162
1 changed files with 7 additions and 0 deletions

View File

@ -2577,6 +2577,13 @@ register_allocation(Program* program, std::vector<IDSet>& live_out_per_block, ra
continue;
}
/* unconditional branches are handled after phis of the target */
if (instr->opcode == aco_opcode::p_branch) {
/* last instruction of the block */
instructions.emplace_back(std::move(instr));
break;
}
std::vector<std::pair<Operand, Definition>> parallelcopy;
assert(!is_phi(instr));