Module: Mesa Branch: master Commit: 5c9d2ed78d61c63532e9fbeeca30393d65113bc2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c9d2ed78d61c63532e9fbeeca30393d65113bc2
Author: Rhys Perry <[email protected]> Date: Tue Nov 17 13:50:10 2020 +0000 aco: use clear() helper instead of writing reg file directly Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7656> --- src/amd/compiler/aco_register_allocation.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index ae371cae9fc..5ad2a296947 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
