From: Daniel Schürmann Date: Tue, 10 Mar 2020 10:50:41 +0000 (+0100) Subject: aco: improve register assignment when live-range splits are necessary X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba482c2e5fdb2a6d76133b17e2ba2283f1e7474c;p=mesa.git 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 Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index a7a44103d27..6863d3877a1 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -641,9 +641,11 @@ std::pair 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; }