freedreno/ir3/ra: compute register target from liveranges
authorRob Clark <robdclark@chromium.org>
Fri, 20 Mar 2020 16:14:36 +0000 (09:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Mar 2020 22:41:36 +0000 (22:41 +0000)
commit1da90ca9bf9fc5b317e0b71f3f77f0bacd725969
tree6ea10b26e0b7aba096bf7a6e154f891a6ce2a011
parentd2cc92c747c20613190ba330f22f219d26422cfa
freedreno/ir3/ra: compute register target from liveranges

Using the output of the first pass isn't ideal, as it can bake in the
losses from fragmentation which the scalar pass is intended to fill in.
This gets worse when we start using "vectorish" instructions, due to
higher use of vecN values.

Instead, we can just use the outputs of the liveness analysis to get a
more accurate # of maximum live values at any point.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4272>
src/freedreno/ir3/ir3_ra.c
src/freedreno/ir3/ir3_ra.h