From fab95c78f9e971de40a350dd667a603b6ef104fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 10 Jul 2024 12:10:26 +0200 Subject: [PATCH] aco/ra: remove special-casing of p_logical_end There is always enough registers available and this code was broken anyway and had no effect. Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 34 -------------------- 1 file changed, 34 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index be716d689f5..9cf1f45d471 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -3014,40 +3014,6 @@ register_allocation(Program* program, ra_test_policy policy) std::find_if(block.instructions.begin(), block.instructions.end(), NonPhi); for (; instr_it != block.instructions.end(); ++instr_it) { aco_ptr& instr = *instr_it; - - /* parallelcopies from p_phi are inserted here which means - * live ranges of killed operands end here as well */ - if (instr->opcode == aco_opcode::p_logical_end) { - /* no need to process this instruction any further */ - if (block.logical_succs.size() != 1) { - instructions.emplace_back(std::move(instr)); - continue; - } - - Block& succ = program->blocks[block.logical_succs[0]]; - unsigned idx = 0; - for (; idx < succ.logical_preds.size(); idx++) { - if (succ.logical_preds[idx] == block.index) - break; - } - for (aco_ptr& phi : succ.instructions) { - if (phi->opcode == aco_opcode::p_phi) { - if (phi->operands[idx].isTemp() && - phi->operands[idx].getTemp().type() == RegType::sgpr && - phi->operands[idx].isFirstKillBeforeDef()) { - Definition phi_op( - read_variable(ctx, phi->operands[idx].getTemp(), block.index)); - phi_op.setFixed(ctx.assignments[phi_op.tempId()].reg); - register_file.clear(phi_op); - } - } else if (phi->opcode != aco_opcode::p_linear_phi) { - break; - } - } - instructions.emplace_back(std::move(instr)); - continue; - } - std::vector> parallelcopy; bool temp_in_scc = register_file[scc];