freedreno/ir3/ra: pick higher numbered scalars in first pass
authorRob Clark <robdclark@chromium.org>
Mon, 23 Mar 2020 17:25:38 +0000 (10:25 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Mar 2020 22:41:36 +0000 (22:41 +0000)
commit90f7d12236c5250bc56699a3071941daef0f515a
treee465afdccb8e1130da458d7bc749dda9c1f94902
parent1da90ca9bf9fc5b317e0b71f3f77f0bacd725969
freedreno/ir3/ra: pick higher numbered scalars in first pass

Since we are re-assigning the scalars anyways in the second pass, assign
them to the highest free reg in the first pass (rather than lowest) to
allow packing vecN regs as low as possible.

Note this required some changes specifically for tex instructions with a
single component writemask that is not necessarily .x, as previously
these would get assigned in the first RA pass, and since they are still
scalar, we'd end up w/ some r47.* and other similarly way-to-high
assignments after the 2nd pass.

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