aco/ra: always abort loop in get_regs_for_copies() if candidate is worse

fossil-db (navi31):
Totals from 2 (0.00% of 79825) affected shaders:
Instrs: 58162 -> 58178 (+0.03%)
CodeSize: 299132 -> 299212 (+0.03%)
Latency: 72864 -> 72861 (-0.00%)
VClause: 977 -> 984 (+0.72%)
Copies: 7433 -> 7428 (-0.07%)
Branches: 1602 -> 1603 (+0.06%)
VALU: 37100 -> 37095 (-0.01%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38679>
This commit is contained in:
Rhys Perry 2025-11-21 11:25:35 +00:00 committed by Marge Bot
parent 137f71895d
commit 61919b93fa

View file

@ -1360,6 +1360,10 @@ get_regs_for_copies(ra_ctx& ctx, RegisterFile& reg_file, std::vector<parallelcop
if (reg_file[j] == 0xF0000000) {
k += 1;
n++;
if (k > num_moves || (k == num_moves && n <= num_vars)) {
found = false;
break;
}
continue;
}
/* we cannot split live ranges of linear vgprs */