freedreno/ir3/ra: assign vreg names to all array elements
authorRob Clark <robdclark@chromium.org>
Thu, 16 Jul 2020 19:41:11 +0000 (12:41 -0700)
committerRob Clark <robdclark@chromium.org>
Sat, 18 Jul 2020 16:21:09 +0000 (09:21 -0700)
commitb1465c382b5ab545e524f7f63cadeb49762eaa96
treea64aba3168b5b73eea125e4a01697ebdb65bf14a
parent6317f7d574aaf3538b41ea8b4815f9ea091b045a
freedreno/ir3/ra: assign vreg names to all array elements

We shouldn't divide-by-two for half-reg arrays.  We set the proper node
interference class, based on `arr->half`.

Fixes a RA fail with 16b arrays:

  src/freedreno/ir3/ir3_ra.c:633: name_to_array: Assertion `!"invalid array name"' failed.

Caused by use/def iterators returning `arr->length` vreg namess, but
only assigning the array half that many names.

Also, since we are assigning unique vreg names to each array element,
there is no need to try and convert from half-reg to it's conflicting
full reg when pre-coloring the array elements.  Getting us closer to
having half-arrays work sanely with split-register-file (a5xx and
earlier).

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