From 4e9a52ffc74ab1ffeb07325eb5484076a4573962 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Mon, 17 Jun 2024 11:34:26 +0200 Subject: [PATCH] ir3: restore interval_offset after liveness recalculation in shared RA This value is usually set by ir3_merge_regs. Since we don't need to call this again after shared RA, we have to copy it manually to the new liveness struct. Fixes: fa22b0901af ("ir3/ra: Add specialized shared register RA/spilling") Signed-off-by: Job Noorman Part-of: (cherry picked from commit dc04fd8e6246c213ee61e0cd88001e959cfb3e21) --- .pick_status.json | 2 +- src/freedreno/ir3/ir3_shared_ra.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 477be15a40c..855c41a7b22 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -144,7 +144,7 @@ "description": "ir3: restore interval_offset after liveness recalculation in shared RA", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fa22b0901af548d5e1433ad4cdbda314182137c5", "notes": null diff --git a/src/freedreno/ir3/ir3_shared_ra.c b/src/freedreno/ir3/ir3_shared_ra.c index 878eef8aae1..98c6053ba23 100644 --- a/src/freedreno/ir3/ir3_shared_ra.c +++ b/src/freedreno/ir3/ir3_shared_ra.c @@ -1423,9 +1423,13 @@ ir3_ra_shared(struct ir3_shader_variant *v, struct ir3_liveness **live_ptr) /* Recalculate liveness and register pressure now that additional values have * been added. * TODO we should only do this if any values have been spilled/reloaded. + * Note: since we don't have to recreate merge sets, we have to manually copy + * interval_offset to the new liveness struct. */ + unsigned interval_offset = live->interval_offset; void *live_mem_ctx = ralloc_parent(live); ralloc_free(live); *live_ptr = ir3_calc_liveness(live_mem_ctx, v->ir); + (*live_ptr)->interval_offset = interval_offset; }