nir: Use remove_and_dce for nir_shader_lower_instructions().
authorEmma Anholt <emma@anholt.net>
Mon, 28 Jun 2021 17:51:06 +0000 (10:51 -0700)
committerEmma Anholt <emma@anholt.net>
Tue, 6 Jul 2021 18:24:45 +0000 (11:24 -0700)
commit5618445d4541ae3cc26f75bef37a549d3bd9767c
tree974152e7671432bba10260aca9fdbf9e005a1116
parent525154857235fe576a568871d562a98359e2fac2
nir: Use remove_and_dce for nir_shader_lower_instructions().

Reduces the work that other shader passes have to do to look at dead code,
and possibly extra rounds around the optimization loop if dce wasn't the
last pass in it.

shader-db runtime -1.12919% +/- 0.264337% (n=49) on SKL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>
src/compiler/nir/nir.c
src/compiler/nir/nir.h