pco: ensure srcs/dests interfere for instructions with repeat > 1

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Simon Perretta 2025-04-06 13:45:58 +01:00 committed by Marge Bot
parent f1b7374bbc
commit 728bd3ad79

View file

@ -627,6 +627,21 @@ static bool pco_ra_func(pco_func *func,
}
}
/* Make srcs and dests interfere for instructions with repeat > 1. */
pco_foreach_instr_in_func_rev (instr, func) {
if (!pco_instr_has_rpt(instr))
continue;
if (pco_instr_get_rpt(instr) < 2)
continue;
pco_foreach_instr_dest_ssa (pdest, instr) {
pco_foreach_instr_src_ssa (psrc, instr) {
ra_add_node_interference(ra_graph, pdest->val, psrc->val);
}
}
}
bool allocated = ra_allocate(ra_graph);
assert(allocated);
/* TODO: spilling. */