Lines Matching defs:ins
34 can_cull_mask(compiler_context *ctx, midgard_instruction *ins)
36 if (ins->dest >= ctx->temp_count)
39 if (ins->dest == ctx->blend_src1)
42 if (ins->type == TAG_LOAD_STORE_4)
43 if (load_store_opcode_props[ins->op].props & LDST_SPECIAL_MASK)
50 can_dce(midgard_instruction *ins)
52 if (ins->mask)
55 if (ins->compact_branch)
58 if (ins->type == TAG_LOAD_STORE_4)
59 if (load_store_opcode_props[ins->op].props & LDST_SIDE_FX)
62 if (ins->type == TAG_TEXTURE_4)
63 if (ins->op == midgard_tex_op_barrier)
76 mir_foreach_instr_in_block_rev(block, ins) {
77 if (can_cull_mask(ctx, ins)) {
78 unsigned type_size = nir_alu_type_get_type_size(ins->dest_type);
80 unsigned oldmask = ins->mask;
83 if (type_size < 32 && ins->type == TAG_LOAD_STORE_4)
86 unsigned rounded = mir_round_bytemask_up(live[ins->dest], round_size);
89 ins->mask &= cmask;
90 progress |= (ins->mask != oldmask);
93 mir_liveness_ins_update(live, ins, ctx->temp_count);
96 mir_foreach_instr_in_block_safe(block, ins) {
97 if (can_dce(ins)) {
98 mir_remove_instruction(ins);
138 mir_foreach_instr_in_block_safe(block, ins) {
139 if (ins->type != TAG_ALU_4) continue;
140 if (ins->compact_branch) continue;
141 if (!OP_IS_MOVE(ins->op)) continue;
146 mir_foreach_instr_in_block_from(block, q, mir_next_op(ins)) {
148 if (mir_has_arg(q, ins->dest))
152 if (q->dest == ins->dest) {
162 mir_remove_instruction(ins);