diff options
Diffstat (limited to 'src/freedreno/ir3/ir3_ra.c')
-rw-r--r-- | src/freedreno/ir3/ir3_ra.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 39d34bb51d9..ff273de1b08 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -702,6 +702,15 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, struct ir3_block *block) block->data = bd; + struct ir3_instruction *first_non_input = NULL; + list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) { + if (instr->opc != OPC_META_INPUT) { + first_non_input = instr; + break; + } + } + + list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) { struct ir3_instruction *src; struct ir3_register *reg; @@ -771,6 +780,9 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, struct ir3_block *block) def(name, id->defn); + if (instr->opc == OPC_META_INPUT) + use(name, first_non_input); + if (is_high(id->defn)) { ra_set_node_class(ctx->g, name, ctx->set->high_classes[id->cls - HIGH_OFFSET]); |