From: Alyssa Rosenzweig Date: Fri, 9 Aug 2019 17:40:23 +0000 (-0700) Subject: pan/midgard: Allocate separate spill indices for lowered moves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41e68094f82ab6f05a8084d0de753f1c95eda26d;p=mesa.git pan/midgard: Allocate separate spill indices for lowered moves This helps RA be slightly more reasonable. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index a44d342c205..4754971acb2 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -497,16 +497,14 @@ mir_lower_special_reads(compiler_context *ctx) midgard_instruction *use = mir_next_op(pre_use); assert(use); mir_insert_instruction_before(use, m); + mir_rewrite_index_dst_tag(ctx, i, idx, classes[j]); } else { + idx = spill_idx++; + m = v_mov(i, blank_alu_src, idx); mir_insert_instruction_before(pre_use, m); + mir_rewrite_index_src_single(pre_use, i, idx); } } - - /* Rewrite to use */ - if (hazard_write) - mir_rewrite_index_dst_tag(ctx, i, idx, classes[j]); - else - mir_rewrite_index_src_tag(ctx, i, idx, classes[j]); } }