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:
Rhys Perry 2020-06-05 19:19:58 +01:00 committed by Marge Bot
parent 70d665d981
commit 4d93fc25f0

View file

@ -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();