ir3/spill: Mark root as non-spillable after inserting

We have to mark the root as non-spillable in case the interval is the
child of some other interval, but we can't know whether it's the child
of some other interval until it's been inserted. Move the setting of
cant_spill below the insertion. This prevents us from using a bogus
parent value.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13650>
(cherry picked from commit db566904ba)
This commit is contained in:
Connor Abbott 2021-10-31 16:01:02 +01:00 committed by Eric Engestrom
parent caf9593d4b
commit e426a9e586
2 changed files with 7 additions and 7 deletions

View file

@ -706,7 +706,7 @@
"description": "ir3/spill: Mark root as non-spillable after inserting",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "613eaac7b53bfbfcd6ef536412be6c9c63cdea4f"
},

View file

@ -520,14 +520,14 @@ insert_src(struct ra_spill_ctx *ctx, struct ir3_register *src)
{
struct ra_spill_interval *interval = ctx->intervals[src->def->name];
if (!interval->interval.inserted) {
ra_spill_ctx_insert(ctx, interval);
interval->needs_reload = true;
interval->already_spilled = true;
}
ra_spill_interval_root(interval)->cant_spill = true;
if (interval->interval.inserted)
return;
ra_spill_ctx_insert(ctx, interval);
interval->needs_reload = true;
interval->already_spilled = true;
}
static void