freedreno/ir3: DCE unused arrays
authorRob Clark <robdclark@chromium.org>
Tue, 14 Jul 2020 17:36:04 +0000 (10:36 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jul 2020 23:26:15 +0000 (23:26 +0000)
commit7f9039f0a894f50499c59ce834f2657ac8633b8d
treef3efb3f1774d7feee25bfbd0448ddee59bb16abb
parent2e4bab84fb6ee09d4b85a1ce722869e27858aec6
freedreno/ir3: DCE unused arrays

Letting unused arrays stick around confuses RA, which assigns vreg names
to the unused arrays, but then does not precolor them (because they are
unused).  This leads to an assert in ra_select_reg_merged():

  skqp: ../src/freedreno/ir3/ir3_ra.c:589: name_to_instr: Assertion '!name_is_array(ctx, name)' failed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3262
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_dce.c