mesa/src
Ian Romanick 284b563fb0 i965/fs: Optimize OR with 0 into a MOV
fs_visitor::set_gs_stream_control_data_bits generates some code like
"control_data_bits | stream_id << ((2 * (vertex_count - 1)) % 32)" as
part of EmitVertex.  The first time this (dynamically) occurs in the
shader, control_data_bits is zero.  Many times we can determine this
statically and various optimizations will collaborate to make one of the
OR operands literal zero.

Converting the OR to a MOV usually allows it to be copy-propagated away.
However, this does not happen in at least some shaders (in the assembly
output of shaders/closed/UnrealEngine4/EffectsCaveDemo/301.shader_test,
search for shl).

All of the affected shaders are geometry shaders.

Broadwell and Skylake had similar results. (Skylake shown)
total instructions in shared programs: 14375452 -> 14375413 (<.01%)
instructions in affected programs: 6422 -> 6383 (-0.61%)
helped: 39
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.14% max: 2.56% x̄: 1.91% x̃: 2.56%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -2.26% -1.57%
Instructions are helped.

total cycles in shared programs: 531981179 -> 531980555 (<.01%)
cycles in affected programs: 27493 -> 26869 (-2.27%)
helped: 39
HURT: 0
helped stats (abs) min: 16 max: 16 x̄: 16.00 x̃: 16
helped stats (rel) min: 0.60% max: 7.92% x̄: 5.94% x̃: 7.92%
95% mean confidence interval for cycles value: -16.00 -16.00
95% mean confidence interval for cycles %-change: -6.98% -4.90%
Cycles are helped.

No changes on earlier platforms.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2018-06-15 17:22:27 -07:00
..
amd Revert "radv: always set/load both depth and stencil clear values" 2018-06-15 16:52:06 +02:00
broadcom v3d: Limit shader threading according to our maximum TMU fifo usage. 2018-06-15 16:09:39 -07:00
compiler glsl: Don't copy propagate elements from SSBO or shared variables either 2018-06-14 11:28:12 -07:00
egl meson: Remove various completed todos 2018-06-13 10:07:03 -07:00
gallium v3d: Handle a no-intersection scissor even if it's outside of the VP. 2018-06-15 16:09:39 -07:00
gbm meson: Remove various completed todos 2018-06-13 10:07:03 -07:00
getopt
glx glx: Fix number of property values to read in glXImportContextEXT 2018-06-05 18:56:43 +02:00
gtest
hgl
intel i965/fs: Optimize OR with 0 into a MOV 2018-06-15 17:22:27 -07:00
loader dri3: Stricter SBC wraparound handling 2018-05-22 17:59:53 +02:00
mapi mesa: add support for ARB_sample_locations 2018-06-14 20:09:45 -06:00
mesa st/mesa: add support for ARB_sample_locations 2018-06-14 20:09:45 -06:00
util util/bitset: include util/macro.h 2018-06-15 11:26:30 +01:00
vulkan vulkan/wsi: Destroy swapchain images after terminating FIFO queues 2018-06-08 14:06:46 +01:00
git_sha1.h.in
Makefile.am egl: rewire the build systems to use libwayland-egl 2018-06-06 12:11:57 -07:00
meson.build meson: only build mesa_st tests when build-tests is true 2018-04-24 14:08:15 -07:00
SConscript