ir3: fix handling of early clobbers in calc_min_limit_pressure

Early clobbers should always add to the register pressure since they
cannot overlap with sources. handle_instr in ir3_spill.c handles this
properly but calc_min_limit_pressure did not.

Fixes: 2ff5826f09 ("ir3/ra: Add IR3_REG_EARLY_CLOBBER")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit af6f82b954)
This commit is contained in:
Job Noorman 2024-06-17 11:34:25 +02:00 committed by Eric Engestrom
parent 777126f943
commit 91236e8eb8
2 changed files with 3 additions and 2 deletions

View file

@ -234,7 +234,7 @@
"description": "ir3: fix handling of early clobbers in calc_min_limit_pressure",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "2ff5826f09d39104ddc33e89ffd6c4d8d47584d3",
"notes": null

View file

@ -2449,7 +2449,8 @@ calc_min_limit_pressure(struct ir3_shader_variant *v,
cur_pressure = (struct ir3_pressure) {0};
ra_foreach_dst (dst, instr) {
if (dst->tied && !(dst->tied->flags & IR3_REG_KILL))
if ((dst->tied && !(dst->tied->flags & IR3_REG_KILL)) ||
(dst->flags & IR3_REG_EARLY_CLOBBER))
add_pressure(&cur_pressure, dst, v->mergedregs);
}