diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-09-14 20:58:33 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-09-21 13:47:28 +0000 |
commit | ec2185c5984b66fb9cae33bd561cf35096c9861e (patch) | |
tree | d68340be6b27df86156733ae0a0fb3de9cd13b36 /src/amd/compiler/aco_reduce_assign.cpp | |
parent | f007115e3b9c958df327c413ccc8ac2a94bc1837 (diff) | |
download | mesa-ec2185c5984b66fb9cae33bd561cf35096c9861e.tar.gz |
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>
Diffstat (limited to 'src/amd/compiler/aco_reduce_assign.cpp')
-rw-r--r-- | src/amd/compiler/aco_reduce_assign.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/compiler/aco_reduce_assign.cpp b/src/amd/compiler/aco_reduce_assign.cpp index 301fe80911c..a1e69a652f6 100644 --- a/src/amd/compiler/aco_reduce_assign.cpp +++ b/src/amd/compiler/aco_reduce_assign.cpp @@ -95,7 +95,7 @@ void setup_reduce_temp(Program* program) reduceTmp_in_loop |= block.loop_nest_depth > 0; if ((int)last_top_level_block_idx != inserted_at) { - reduceTmp = {program->allocateId(), reduceTmp.regClass()}; + reduceTmp = program->allocateTmp(reduceTmp.regClass()); aco_ptr<Pseudo_instruction> create{create_instruction<Pseudo_instruction>(aco_opcode::p_start_linear_vgpr, Format::PSEUDO, 0, 1)}; create->definitions[0] = Definition(reduceTmp); /* find the right place to insert this definition */ @@ -135,7 +135,7 @@ void setup_reduce_temp(Program* program) vtmp_in_loop |= need_vtmp && block.loop_nest_depth > 0; if (need_vtmp && (int)last_top_level_block_idx != vtmp_inserted_at) { - vtmp = {program->allocateId(), vtmp.regClass()}; + vtmp = program->allocateTmp(vtmp.regClass()); aco_ptr<Pseudo_instruction> create{create_instruction<Pseudo_instruction>(aco_opcode::p_start_linear_vgpr, Format::PSEUDO, 0, 1)}; create->definitions[0] = Definition(vtmp); if (last_top_level_block_idx == block.index) { |