diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-05-23 02:23:39 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-04 20:14:50 +0000 |
commit | 5da0a33fab0b3cc6ea03c102bd1e156904d983e5 (patch) | |
tree | bd36fd0f8143332c4a0ea0fa0e3eb976294adb94 /src/gallium/drivers | |
parent | 33800f461244435ed3256ed90fcba2271b387323 (diff) |
panfrost/midgard: Cleanup copy propagation
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Ryan Houdek <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/midgard/midgard_compile.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index b57b46aaecd..c519193a56a 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -1769,17 +1769,10 @@ midgard_opt_copy_prop(compiler_context *ctx, midgard_block *block) if (mir_nontrivial_mod(src, is_int, mask)) continue; if (ins->alu.outmod != midgard_outmod_none) continue; - mir_foreach_instr_in_block_from(block, v, mir_next_op(ins)) { - if (v->ssa_args.src0 == to) { - v->ssa_args.src0 = from; - progress = true; - } - - if (v->ssa_args.src1 == to && !v->ssa_args.inline_constant) { - v->ssa_args.src1 = from; - progress = true; - } - } + /* We're clear -- rewrite */ + mir_rewrite_index_src(ctx, to, from); + mir_remove_instruction(ins); + progress |= true; } return progress; |