aco: improve register assignment when live-range splits are necessary

When finding a good place for a register, we can ignore
killed operands.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4130>
This commit is contained in:
Daniel Schürmann 2020-03-10 11:50:41 +01:00 committed by Marge Bot
parent fb5a7902f2
commit ba482c2e5f
1 changed files with 5 additions and 3 deletions

View File

@ -641,9 +641,11 @@ std::pair<PhysReg, bool> get_reg_impl(ra_ctx& ctx,
continue;
/* dead operands effectively reduce the number of estimated moves */
if (remaining_op_moves && reg_file.is_blocked(PhysReg{j})) {
k--;
remaining_op_moves--;
if (reg_file.is_blocked(PhysReg{j})) {
if (remaining_op_moves) {
k--;
remaining_op_moves--;
}
continue;
}