aco: add VOPD statistic

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
This commit is contained in:
Rhys Perry
2023-05-24 18:43:13 +01:00
committed by Marge Bot
parent 6547e17e60
commit c66d42b9ed
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -59,6 +59,7 @@ static const std::array<aco_compiler_statistic_info, aco_num_statistics> statist
ret[aco_statistic_salu] = aco_compiler_statistic_info{"SALU", "Number of SALU instructions"};
ret[aco_statistic_vmem] = aco_compiler_statistic_info{"VMEM", "Number of VMEM instructions"};
ret[aco_statistic_smem] = aco_compiler_statistic_info{"SMEM", "Number of SMEM instructions"};
ret[aco_statistic_vopd] = aco_compiler_statistic_info{"VOPD", "Number of VOPD instructions"};
return ret;
}();
+1
View File
@@ -228,6 +228,7 @@ enum aco_statistic {
aco_statistic_salu,
aco_statistic_vmem,
aco_statistic_smem,
aco_statistic_vopd,
aco_num_statistics
};
+2
View File
@@ -540,6 +540,8 @@ collect_preasm_stats(Program* program)
if (instr->isSALU() && !instr->isSOPP() &&
instr_info.classes[(int)instr->opcode] != instr_class::waitcnt)
program->statistics[aco_statistic_salu]++;
if (instr->isVOPD())
program->statistics[aco_statistic_vopd]++;
if ((instr->isVMEM() || instr->isScratch() || instr->isGlobal()) &&
!instr->operands.empty()) {