mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 21:50:34 +01:00
aco: use clear() helper instead of writing reg file directly
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7656>
This commit is contained in:
parent
d671cf7f53
commit
5c9d2ed78d
1 changed files with 3 additions and 4 deletions
|
|
@ -2032,10 +2032,9 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
|
|||
if (phi->operands[idx].isTemp() &&
|
||||
phi->operands[idx].getTemp().type() == RegType::sgpr &&
|
||||
phi->operands[idx].isFirstKillBeforeDef()) {
|
||||
Temp phi_op = read_variable(ctx, phi->operands[idx].getTemp(), block.index);
|
||||
PhysReg reg = ctx.assignments[phi_op.id()].reg;
|
||||
assert(register_file[reg] == phi_op.id());
|
||||
register_file[reg] = 0;
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue