diff options
author | Rob Clark <[email protected]> | 2020-03-16 06:41:41 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-13 20:47:28 +0000 |
commit | b787b353d04e23fdea567186f7cb422fd687bcdd (patch) | |
tree | 2ee5d5736e4d00db5cc95d76379d0eb258aee6b0 /src/freedreno/ir3/ir3.c | |
parent | 89a78a07dec8f6fab7a80bba951b134a42bb9a2c (diff) |
freedreno/ir3: add mov/cov stats
While not always avoidable, cov instructions are a useful thing to look
at to see if we could fold into src.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4440>
Diffstat (limited to 'src/freedreno/ir3/ir3.c')
-rw-r--r-- | src/freedreno/ir3/ir3.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index 6b6b83b62cf..f2dbc88f3bb 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -917,13 +917,11 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info, { uint32_t *ptr, *dwords; + memset(info, 0, sizeof(*info)); info->gpu_id = gpu_id; info->max_reg = -1; info->max_half_reg = -1; info->max_const = -1; - info->instrs_count = 0; - info->sizedwords = 0; - info->ss = info->sy = 0; foreach_block (block, &shader->block_list) { foreach_instr (instr, &block->instr_list) { @@ -958,6 +956,13 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info, info->nops_count += instr->nop; if (instr->opc == OPC_NOP) info->nops_count += 1 + instr->repeat; + if (instr->opc == OPC_MOV) { + if (instr->cat1.src_type == instr->cat1.dst_type) { + info->mov_count += 1 + instr->repeat; + } else { + info->cov_count += 1 + instr->repeat; + } + } dwords += 2; if (instr->flags & IR3_INSTR_SS) { |