mesa/src/compiler
Ian Romanick 7dba7df5e5 nir/range-analysis: Handle constants in nir_op_mov just like nir_op_bcsel
I discovered this while looking at a shader that was hurt by some other
work I'm doing.  When I examined the changes, I was confused that one
instance of a comparison that was used in a discard_if was (incorrectly)
eliminated, while another instance used by a bcsel was (correctly) not
eliminated.  I had to use NIR_PRINT=true to see exactly where things
when wrong.

A bunch of shaders in Goat Simulator, Dungeon Defenders, Sanctum 2, and
Strike Suit Zero were impacted.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fixes: 405de7ccb6 ("nir/range-analysis: Rudimentary value range analysis pass")

All Intel platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 16280659 -> 16281075 (<.01%)
instructions in affected programs: 21042 -> 21458 (1.98%)
helped: 0
HURT: 136
HURT stats (abs)   min: 1 max: 9 x̄: 3.06 x̃: 3
HURT stats (rel)   min: 1.16% max: 6.12% x̄: 2.23% x̃: 2.03%
95% mean confidence interval for instructions value: 2.93 3.19
95% mean confidence interval for instructions %-change: 2.08% 2.37%
Instructions are HURT.

total cycles in shared programs: 367168270 -> 367170313 (<.01%)
cycles in affected programs: 172020 -> 174063 (1.19%)
helped: 14
HURT: 111
helped stats (abs) min: 2 max: 80 x̄: 21.21 x̃: 9
helped stats (rel) min: 0.10% max: 4.47% x̄: 1.35% x̃: 0.79%
HURT stats (abs)   min: 2 max: 584 x̄: 21.08 x̃: 5
HURT stats (rel)   min: 0.12% max: 17.28% x̄: 1.55% x̃: 0.40%
95% mean confidence interval for cycles value: 5.41 27.28
95% mean confidence interval for cycles %-change: 0.64% 1.81%
Cycles are HURT.
2019-08-29 13:15:53 -07:00
..
glsl compiler/glsl: Fix warning about unused function 2019-08-23 13:25:27 -07:00
nir nir/range-analysis: Handle constants in nir_op_mov just like nir_op_bcsel 2019-08-29 13:15:53 -07:00
spirv nir: Add explicit signs to image min/max intrinsics 2019-08-21 17:19:55 +00:00
Android.glsl.gen.mk mesa: android: Remove unnecessary dependency tracking rules 2019-05-06 11:29:25 +00:00
Android.glsl.mk
Android.mk
Android.nir.gen.mk nir: Add missing dependency in Android.nir.gen.mk 2019-08-19 09:53:18 +03:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
blob.c compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
blob.h compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
builtin_type_macros.h glsl_types: vec8/vec16 support 2018-03-25 10:42:54 -04:00
glsl_types.cpp compiler: ensure glsl types are not created without a reference 2019-08-21 09:44:10 +02:00
glsl_types.h nir: add nir_lower_to_explicit() 2019-08-08 12:10:39 -05:00
Makefile.sources nir: merge and extend nir_opt_move_comparisons and nir_opt_move_load_ubo 2019-08-12 22:01:30 +00:00
meson.build meson: drop unused dep_{thread,dl} 2019-08-03 00:08:37 +00:00
nir_types.cpp nir: add nir_lower_to_explicit() 2019-08-08 12:10:39 -05:00
nir_types.h nir: add nir_lower_to_explicit() 2019-08-08 12:10:39 -05:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl scons: Generate float64_glsl.h for glsl_to_nir fp64 lowering 2019-03-02 14:33:44 -08:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c glsl: Optionally declare gl_PointCoord as a system value 2019-07-18 13:20:39 +00:00
shader_enums.h compiler: add SYSTEM_VALUE_TESS_LEVEL_OUTER/INNER_DEFAULT 2019-08-12 14:52:17 -04:00
shader_info.h compiler: add shader_info.cs.user_data_components_amd 2019-08-12 14:52:17 -04:00