From 171210e36aa120cfec326f7550c11e9d8cb93cc3 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 21 Apr 2026 14:56:13 +0100 Subject: [PATCH] aco/ra: remove precolored checks in get_reg_impl() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since tied definitions no longer use precoloring, I don't think this is needed anymore. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 2b73d962694..cee518e09a6 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1333,15 +1333,8 @@ get_reg_impl(ra_ctx& ctx, const RegisterFile& reg_file, std::vector is_killed_operand; /* per-register */ - std::bitset<256> is_precolored; /* per-register */ for (unsigned j = 0; j < instr->operands.size(); j++) { Operand& op = instr->operands[j]; - if (op.isTemp() && op.isPrecolored() && !op.isFirstKillBeforeDef() && - bounds.contains(op.physReg())) { - for (unsigned i = 0; i < op.size(); ++i) { - is_precolored[(op.physReg() & 0xff) + i] = true; - } - } if (op.isTemp() && op.isFirstKillBeforeDef() && bounds.contains(op.physReg()) && !reg_file.test(PhysReg{op.physReg().reg()}, align(op.bytes() + op.physReg().byte(), 4))) { assert(op.isFixed()); @@ -1353,14 +1346,6 @@ get_reg_impl(ra_ctx& ctx, const RegisterFile& reg_file, std::vectordefinitions.size(); j++) { - Definition& def = instr->definitions[j]; - if (def.isTemp() && def.isPrecolored() && bounds.contains(def.physReg())) { - for (unsigned i = 0; i < def.size(); ++i) { - is_precolored[(def.physReg() & 0xff) + i] = true; - } - } - } assert((regs_free + ctx.num_linear_vgprs) >= size); @@ -1406,7 +1391,7 @@ get_reg_impl(ra_ctx& ctx, const RegisterFile& reg_file, std::vector