aco: keep track of temporaries' regclasses in the Program

A future change will switch the liveness sets to bit vectors, which don't
contain regclass information.

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/6733>
This commit is contained in:
Rhys Perry
2020-09-14 20:58:33 +01:00
committed by Marge Bot
parent f007115e3b
commit ec2185c598
10 changed files with 57 additions and 49 deletions
+3 -2
View File
@@ -2193,8 +2193,9 @@ bool combine_add_sub_b2i(opt_ctx& ctx, aco_ptr<Instruction>& instr, aco_opcode n
}
ctx.uses[instr->operands[i].tempId()]--;
new_instr->definitions[0] = instr->definitions[0];
new_instr->definitions[1] = instr->definitions.size() == 2 ? instr->definitions[1] :
Definition(ctx.program->allocateId(), ctx.program->lane_mask);
new_instr->definitions[1] =
instr->definitions.size() == 2 ? instr->definitions[1] :
Definition(ctx.program->allocateTmp(ctx.program->lane_mask));
new_instr->definitions[1].setHint(vcc);
new_instr->operands[0] = Operand(0u);
new_instr->operands[1] = instr->operands[!i];