From d946a753e33da51d0d0541d74386f7de0dd40cec Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 16 Jan 2025 11:29:41 +0000 Subject: [PATCH] aco/ra: unconditionally call undo_renames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no real reason to not do this more. fossil-db (navi21): Totals from 2615 (3.29% of 79377) affected shaders: Instrs: 4729505 -> 4729484 (-0.00%); split: -0.00%, +0.00% CodeSize: 25210992 -> 25210036 (-0.00%); split: -0.00%, +0.00% Latency: 31572966 -> 31572435 (-0.00%); split: -0.00%, +0.00% InvThroughput: 6918552 -> 6918560 (+0.00%); split: -0.00%, +0.00% VClause: 132152 -> 132116 (-0.03%); split: -0.03%, +0.00% SClause: 98595 -> 98575 (-0.02%); split: -0.04%, +0.02% fossil-db (polaris10): Totals from 1039 (1.68% of 61794) affected shaders: Instrs: 708761 -> 708766 (+0.00%); split: -0.00%, +0.00% CodeSize: 3588772 -> 3588792 (+0.00%); split: -0.00%, +0.00% Latency: 7458892 -> 7459513 (+0.01%); split: -0.00%, +0.01% InvThroughput: 3494669 -> 3494722 (+0.00%); split: -0.00%, +0.00% VClause: 16754 -> 16737 (-0.10%) SClause: 18190 -> 18156 (-0.19%); split: -0.49%, +0.31% Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 740ad5ed282..fcdccb30528 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -3192,7 +3192,6 @@ register_allocation(Program* program, ra_test_policy policy) } /* handle fixed definitions first */ - bool has_precolored_defs = false; for (unsigned i = 0; i < instr->definitions.size(); ++i) { auto& definition = instr->definitions[i]; if (!definition.isFixed()) @@ -3215,7 +3214,6 @@ register_allocation(Program* program, ra_test_policy policy) assert(success); update_renames(ctx, register_file, parallelcopy, instr); - has_precolored_defs = true; } if (!definition.isTemp()) @@ -3307,8 +3305,7 @@ register_allocation(Program* program, ra_test_policy policy) register_file.fill(*definition); } - if (instr->opcode == aco_opcode::p_create_vector || has_precolored_defs) - undo_renames(ctx, parallelcopy, instr); + undo_renames(ctx, parallelcopy, instr); handle_pseudo(ctx, register_file, instr.get());