aco/ra: only change registers of already handled operands in update_renames()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
This commit is contained in:
Daniel Schürmann
2025-04-28 10:41:53 +02:00
committed by Marge Bot
parent 51a2e1eb94
commit 4fad3514a9
+5 -2
View File
@@ -901,7 +901,8 @@ update_renames(ra_ctx& ctx, RegisterFile& reg_file, std::vector<parallelcopy>& p
for (Operand& op : instr->operands) {
if (op.isTemp() && op.tempId() == other.def.tempId()) {
// FIXME: ensure that the operand can use this reg
op.setFixed(other.def.physReg());
if (op.isFixed())
op.setFixed(other.def.physReg());
fill = !op.isKillBeforeDef();
}
}
@@ -947,7 +948,8 @@ update_renames(ra_ctx& ctx, RegisterFile& reg_file, std::vector<parallelcopy>& p
continue;
op.setTemp(copy.def.getTemp());
op.setFixed(copy.def.physReg());
if (op.isFixed())
op.setFixed(copy.def.physReg());
/* Copy-kill or precolored operand parallelcopies are only added when setting up
* operands.
@@ -2311,6 +2313,7 @@ get_reg_for_operand(ra_ctx& ctx, RegisterFile& register_file,
parallelcopy.emplace_back(pc_op, pc_def);
update_renames(ctx, register_file, parallelcopy, instr);
register_file.fill(Definition(operand.getTemp(), dst));
operand.setFixed(dst);
}
PhysReg