mesa/src/microsoft
Jason Ekstrand 624e799cc3 nir: Drop nir_ssa_def::name and nir_register::name
We say that they're for debug only but we don't really have a good
policy around when to set them and when not to.  In particular,
nir_lower_system_values and nir_lower_vars_to_ssa which are the chief
producers of SSA values which might reasonably have a name do not bother
to set one.  We have some names set from things like BLORP and RADV's
meta shaders but AFAICT, they're setting a name more because it's there
than because they actually care.

Also, most things other than nir_clone and nir_serialize don't bother to
try and preserve them.  You can see in the diffstat of this commit
exactly what passes attempt to preserve names.  Notably missing from the
list is opt_algebraic which is the single largest source of SSA def
churn and it happily throws names away.

These observations lead me to question whether or not names are actually
useful at all or if they're just taking up space (8B per instruction)
and wasting CPU cycles (to ralloc_strdup on the off chance we do have
one).  I don't think I can think of a single time in recent history
where I've been debugging a shader issue and a SSA value name has been
there and been useful.  If anything, the few times they are there, they
just throw me off because they mess up the indentation in nir_print.

iris shader-db on my system gets runtime -2.07734% +/- 1.26933% (n=5)

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5439>
2021-07-08 17:34:41 +00:00
..
clc nir: Move workgroup_size and workgroup_variable_size into common shader_info 2021-06-08 09:23:55 -07:00
compiler nir: Drop nir_ssa_def::name and nir_register::name 2021-07-08 17:34:41 +00:00
resource_state_manager microsoft/resource_state_manager: Remove unused private variable 2021-01-03 23:07:21 +00:00
spirv_to_dxil microsoft/compiler: Add support for get_ssbo_size to translator 2021-06-29 23:15:28 +00:00
meson.build microsoft/compiler: Make resource_state_manager only build with_gallium_d3d12 2021-01-29 12:54:02 -08:00