ir3: index instructions before fixing up merge sets after spilling

ir3_force_merge (through merge_merge_sets) expects instructions to be
indexed. However, the instructions created during spilling would not be
automatically indexed at this point.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 7a5b198a44)
This commit is contained in:
Job Noorman 2024-06-17 11:34:25 +02:00 committed by Eric Engestrom
parent ec7a8d6444
commit 23d79f9e1f
2 changed files with 3 additions and 2 deletions

View file

@ -164,7 +164,7 @@
"description": "ir3: index instructions before fixing up merge sets after spilling",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "613eaac7b53bfbfcd6ef536412be6c9c63cdea4f",
"notes": null

View file

@ -2085,6 +2085,8 @@ fixup_merge_sets(struct ir3_liveness *live, struct ir3 *ir)
}
}
ir3_index_instrs_for_merge_sets(ir);
foreach_block (block, &ir->block_list) {
foreach_instr (instr, &block->instr_list) {
if (instr->opc != OPC_META_SPLIT &&
@ -2103,7 +2105,6 @@ fixup_merge_sets(struct ir3_liveness *live, struct ir3 *ir)
}
}
ir3_index_instrs_for_merge_sets(ir);
ir3_merge_regs(live, ir);
}