summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_builder_h.py
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2020-09-14 20:58:33 +0100
committerMarge Bot <eric+marge@anholt.net>2020-09-21 13:47:28 +0000
commitec2185c5984b66fb9cae33bd561cf35096c9861e (patch)
treed68340be6b27df86156733ae0a0fb3de9cd13b36 /src/amd/compiler/aco_builder_h.py
parentf007115e3b9c958df327c413ccc8ac2a94bc1837 (diff)
downloadmesa-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_builder_h.py')
-rw-r--r--src/amd/compiler/aco_builder_h.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/amd/compiler/aco_builder_h.py b/src/amd/compiler/aco_builder_h.py
index a5338ce67ef..5be8c20aeed 100644
--- a/src/amd/compiler/aco_builder_h.py
+++ b/src/amd/compiler/aco_builder_h.py
@@ -253,23 +253,23 @@ public:
}
Temp tmp(RegClass rc) {
- return (Temp){program->allocateId(), rc};
+ return program->allocateTmp(rc);
}
Temp tmp(RegType type, unsigned size) {
- return (Temp){program->allocateId(), RegClass(type, size)};
+ return tmp(RegClass(type, size));
}
Definition def(RegClass rc) {
- return Definition((Temp){program->allocateId(), rc});
+ return Definition(program->allocateTmp(rc));
}
Definition def(RegType type, unsigned size) {
- return Definition((Temp){program->allocateId(), RegClass(type, size)});
+ return def(RegClass(type, size));
}
Definition def(RegClass rc, PhysReg reg) {
- return Definition(program->allocateId(), reg, rc);
+ return Definition(program->allocateId(rc), reg, rc);
}
inline aco_opcode w64or32(WaveSpecificOpcode opcode) const {