ir3: make indexing instructions optional in ir3_merge_regs

While fixing up merge sets after spilling, we need to index before
calling ir3_merge_regs so it would be a waste to index again.

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 018d0ab805)
This commit is contained in:
Job Noorman 2024-06-17 11:34:25 +02:00 committed by Eric Engestrom
parent 778206e137
commit ec7a8d6444
4 changed files with 3 additions and 3 deletions

View file

@ -174,7 +174,7 @@
"description": "ir3: make indexing instructions optional in ir3_merge_regs",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "613eaac7b53bfbfcd6ef536412be6c9c63cdea4f",
"notes": null

View file

@ -560,8 +560,6 @@ dump_merge_sets(struct ir3 *ir)
void
ir3_merge_regs(struct ir3_liveness *live, struct ir3 *ir)
{
ir3_index_instrs_for_merge_sets(ir);
/* First pass: coalesce phis, which must be together. */
foreach_block (block, &ir->block_list) {
foreach_instr (instr, &block->instr_list) {

View file

@ -2561,6 +2561,7 @@ ir3_ra(struct ir3_shader_variant *v)
ir3_debug_print(v->ir, "AFTER: create_parallel_copies");
ir3_index_instrs_for_merge_sets(v->ir);
ir3_merge_regs(live, v->ir);
bool has_shared_vectors = false;

View file

@ -2103,6 +2103,7 @@ fixup_merge_sets(struct ir3_liveness *live, struct ir3 *ir)
}
}
ir3_index_instrs_for_merge_sets(ir);
ir3_merge_regs(live, ir);
}