nir: split nir_opt_shrink_stores from nir_opt_shrink_vectors

This patch moves the shrinking of store sources into
a separate pass.
The reasoning behind this is that this pass usually only
needs to be called once while nir_shrink_vectors might
better be called several times. This allows to move
the pass(es) out of the optimization loops.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14480>
This commit is contained in:
Daniel Schürmann
2022-01-10 13:34:20 +00:00
parent b07372312d
commit 2dba7e6056
3 changed files with 133 additions and 0 deletions

View File

@@ -245,6 +245,7 @@ files_libnir = files(
'nir_opt_ray_queries.c',
'nir_opt_rematerialize_compares.c',
'nir_opt_remove_phis.c',
'nir_opt_shrink_stores.c',
'nir_opt_shrink_vectors.c',
'nir_opt_sink.c',
'nir_opt_trivial_continues.c',