From 41e68094f82ab6f05a8084d0de753f1c95eda26d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 9 Aug 2019 10:40:23 -0700 Subject: [PATCH] pan/midgard: Allocate separate spill indices for lowered moves This helps RA be slightly more reasonable. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_ra.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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]); } } -- 2.30.2