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

View File

@@ -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 {