mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
aco: count v_mul_lo_u32 as 16 cycles
There are more, but this is a common one. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5390>
This commit is contained in:
parent
70d665d981
commit
4d93fc25f0
1 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ void collect_preasm_stats(Program *program)
|
|||
/* TODO: this incorrectly assumes instructions always take 4 cycles */
|
||||
/* assume loops execute 4 times (TODO: it would be nice to be able to consider loop unrolling) */
|
||||
unsigned iter = 1 << (block.loop_nest_depth * 2);
|
||||
program->statistics[statistic_cycles] += 4 * iter;
|
||||
unsigned cycles = instr->opcode == aco_opcode::v_mul_lo_u32 ? 16 : 4;
|
||||
program->statistics[statistic_cycles] += cycles * iter;
|
||||
}
|
||||
|
||||
program->statistics[statistic_vmem_clauses] += vmem_clause_res.size();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue