lima: run nir dce after nir_lower_vec_to_movs
authorErico Nunes <nunes.erico@gmail.com>
Wed, 10 Mar 2021 21:22:01 +0000 (22:22 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 12 Mar 2021 11:46:54 +0000 (11:46 +0000)
commitc453921c91cb43a098b3e889bf0dfaf76b2bafce
treef9f805e93ab075c912410853b4ce3ffb43ed8abd
parent3f1c375581faccd9e356e344432b7d6c6e27902c
lima: run nir dce after nir_lower_vec_to_movs

Some of the 'vec*' nir instructions may hold references to dead code
until the nir_lower_vec_to_movs pass runs.
After nir_lower_vec_to_movs, that code can finally be cleaned by dce,
so add an additional dce pass.
This not only potentially further removes unneeded code from the nir
representation but also prevents bugs with the compiler from special
case unused code that is not expected (e.g. root undef type nodes).

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9507>
src/gallium/drivers/lima/lima_program.c