Mesa (master): aco: remove rollback code around parallelcopy creation

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


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

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

aco: remove rollback code around parallelcopy creation

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 | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index d70d56bf1b1..2d33d7e4490 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -2271,26 +2271,17 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
 
             if (temp_in_scc && sgpr_operands_alias_defs) {
                /* disable definitions and re-enable operands */
+               RegisterFile tmp_file(register_file);
                for (const Definition& def : instr->definitions) {
                   if (def.isTemp() && !def.isKill())
-                     register_file.clear(def);
+                     tmp_file.clear(def);
                }
                for (const Operand& op : instr->operands) {
                   if (op.isTemp() && op.isFirstKill())
-                     register_file.block(op.physReg(), op.regClass());
+                     tmp_file.block(op.physReg(), op.regClass());
                }
 
-               handle_pseudo(ctx, register_file, pc.get());
-
-               /* re-enable live vars */
-               for (const Operand& op : instr->operands) {
-                  if (op.isTemp() && op.isFirstKill())
-                     register_file.clear(op);
-               }
-               for (const Definition& def : instr->definitions) {
-                  if (def.isTemp() && !def.isKill())
-                     register_file.fill(def);
-               }
+               handle_pseudo(ctx, tmp_file, pc.get());
             } else {
                pc->tmp_in_scc = false;
             }



More information about the mesa-commit mailing list