From ed7814def77384fc0c8588b173ecdf8f383dc372 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Thu, 28 Jul 2022 10:23:46 +0300 Subject: [PATCH] ir3/ra: Always insert interval for precolored inputs insert_dst checked whether dst is unused, however for precolored inputs we always want to reserve a reg for them. Input could be unused only if we explicitly want it. Suggested-by: Connor Abbott Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/ir3/ir3_ra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 8274b2df2ec..871673472fd 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -1797,10 +1797,15 @@ handle_precolored_input(struct ra_ctx *ctx, struct ir3_instruction *instr) if (instr->dsts[0]->num == INVALID_REG) return; + struct ra_file *file = ra_get_file(ctx, instr->dsts[0]); struct ra_interval *interval = &ctx->intervals[instr->dsts[0]->name]; physreg_t physreg = ra_reg_get_physreg(instr->dsts[0]); allocate_dst_fixed(ctx, instr->dsts[0], physreg); - insert_dst(ctx, instr->dsts[0]); + + d("insert precolored dst %u physreg %u", instr->dsts[0]->name, + ra_interval_get_physreg(interval)); + + ra_file_insert(file, interval); interval->frozen = true; }