Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
}
- }
- for (i = 0, count = 0; i < cfg->block_count; ++i)
- {
struct vsir_block *block = &cfg->blocks[i];
struct vkd3d_shader_instruction *ins;
for (ins = block->begin; ins <= block->end; ++ins)
{
for (j = 0; j < ins->src_count; ++j)
count += register_map_undominated_use(&ins->src[j].reg, &ssa, block, origin_blocks);
}
- }
- if (!count)
You don't really need to keep the whole count, right? You just need to know whether you have at least one to optimize the last pass away.