Mesa (master): aco: remove rollback code for blocked fixed definitions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 4 21:20:32 UTC 2020


Module: Mesa
Branch: master
Commit: 8794f0348a9507dd3696b1b01a26f2c1759bfdc2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8794f0348a9507dd3696b1b01a26f2c1759bfdc2

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Nov 16 14:37:14 2020 +0000

aco: remove rollback code for blocked fixed definitions

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7656>

---

 src/amd/compiler/aco_register_allocation.cpp | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 2d33d7e4490..9f727576a6a 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -2117,31 +2117,22 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
                /* create parallelcopy pair to move blocking vars */
                std::set<std::pair<unsigned, unsigned>> vars = collect_vars(ctx, register_file, definition.physReg(), definition.size());
 
+               RegisterFile tmp_file(register_file);
                /* re-enable the killed operands, so that we don't move the blocking vars there */
                for (const Operand& op : instr->operands) {
                   if (op.isTemp() && op.isFirstKillBeforeDef())
-                     register_file.fill(op);
+                     tmp_file.fill(op);
                }
 
                ASSERTED bool success = false;
                DefInfo info(ctx, instr, definition.regClass(), -1);
-               success = get_regs_for_copies(ctx, register_file, parallelcopy,
+               success = get_regs_for_copies(ctx, tmp_file, parallelcopy,
                                              vars, info.lb, info.ub, instr,
                                              definition.physReg(),
                                              definition.physReg() + definition.size() - 1);
                assert(success);
 
                update_renames(ctx, register_file, parallelcopy, instr, false);
-
-               /* once again, disable killed operands */
-               for (const Operand& op : instr->operands) {
-                  if (op.isTemp() && op.isFirstKillBeforeDef())
-                     register_file.clear(op);
-               }
-               for (unsigned k = 0; k < i; k++) {
-                  if (instr->definitions[k].isTemp() && ctx.defs_done.test(k) && !instr->definitions[k].isKill())
-                     register_file.fill(instr->definitions[k]);
-               }
             }
             ctx.defs_done.set(i);
 



More information about the mesa-commit mailing list