Mesa (master): aco: improve register assignment when live-range splits are necessary
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 9 15:28:03 UTC 2020
Module: Mesa
Branch: master
Commit: ba482c2e5fdb2a6d76133b17e2ba2283f1e7474c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba482c2e5fdb2a6d76133b17e2ba2283f1e7474c
Author: Daniel Schürmann <daniel at schuermann.dev>
Date: Tue Mar 10 11:50:41 2020 +0100
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 at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4130>
---
src/amd/compiler/aco_register_allocation.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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<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;
}
More information about the mesa-commit
mailing list