mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
pco/ra: properly handle non-dced instrs with unused defs
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:
parent
34993085f4
commit
ee1b1e4a60
1 changed files with 8 additions and 0 deletions
|
|
@ -731,6 +731,14 @@ static bool pco_ra_func(pco_func *func, pco_ra_ctx *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
/* If there are instructions left with any unused dests that aren't/couldn't
|
||||
* be DCEd (e.g. because of side effects), ensure their range ends are setup
|
||||
* to avoid missing overlaps and clobbering regs.
|
||||
*/
|
||||
for (unsigned var = 0; var < num_vars; ++var)
|
||||
if (live_ranges[var].start != ~0U && live_ranges[var].end == 0)
|
||||
live_ranges[var].end = live_ranges[var].start;
|
||||
|
||||
/* Build interference graph from overlapping live ranges. */
|
||||
for (unsigned var0 = 0; var0 < num_vars; ++var0) {
|
||||
for (unsigned var1 = var0 + 1; var1 < num_vars; ++var1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue