mesa/src
Francisco Jerez af2c320190 intel/fs: Implement GRF bank conflict mitigation pass.
Unnecessary GRF bank conflicts increase the issue time of ternary
instructions (the overwhelmingly most common of which is MAD) by
roughly 50%, leading to reduced ALU throughput.  This pass attempts to
minimize the number of bank conflicts by rearranging the layout of the
GRF space post-register allocation.  It's in general not possible to
eliminate all of them without introducing extra copies, which are
typically more expensive than the bank conflict itself.

In a shader-db run on SKL this helps roughly 46k shaders:

   total conflicts in shared programs: 1008981 -> 600461 (-40.49%)
   conflicts in affected programs: 816222 -> 407702 (-50.05%)
   helped: 46234
   HURT: 72

The running time of shader-db itself on SKL seems to be increased by
roughly 2.52%±1.13% with n=20 due to the additional work done by the
compiler back-end.

On earlier generations the pass is somewhat less effective in relative
terms because the hardware incurs a bank conflict anytime the last two
sources of the instruction are duplicate (e.g. while trying to square
a value using MAD), which is impossible to avoid without introducing
copies.  E.g. for a shader-db run on SNB:

   total conflicts in shared programs: 944636 -> 623185 (-34.03%)
   conflicts in affected programs: 853258 -> 531807 (-37.67%)
   helped: 31052
   HURT: 19

And on BDW:

   total conflicts in shared programs: 1418393 -> 987539 (-30.38%)
   conflicts in affected programs: 1179787 -> 748933 (-36.52%)
   helped: 47592
   HURT: 70

On SKL GT4e this improves performance of GpuTest Volplosion by 3.64%
±0.33% with n=16.

NOTE: This patch intentionally disregards some i965 coding conventions
      for the sake of reviewability.  This is addressed by the next
      squash patch which introduces an amount of (for the most part
      boring) boilerplate that might distract reviewers from the
      non-trivial algorithmic details of the pass.

The following patch is squashed in:

SQUASH: intel/fs/bank_conflicts: Roll back to the nineties.

Acked-by: Matt Turner <mattst88@gmail.com>
2017-12-07 15:56:06 -08:00
..
amd radv: use a faster version for nir_op_pack_half_2x16 2017-12-07 17:21:50 +01:00
broadcom meson: add dep_thread to every lib that includes threads.h 2017-12-07 17:29:42 +00:00
compiler mesa/spirv: move and rename nir_spirv_supported_capabilities 2017-12-07 17:15:11 +01:00
egl meson: fix underlinkage without dri3 2017-12-04 13:15:02 -08:00
gallium meson: Add lmsensors to gallium libgl-xlib target. 2017-12-07 10:20:58 -08:00
gbm meson: add dep_thread to every lib that includes threads.h 2017-12-07 17:29:42 +00:00
getopt
glx meson: fix underlinkage without dri3 2017-12-04 13:15:02 -08:00
gtest meson: convert gtest to an internal dependency 2017-10-03 10:02:08 -07:00
hgl
intel intel/fs: Implement GRF bank conflict mitigation pass. 2017-12-07 15:56:06 -08:00
loader meson: add dep_thread to every lib that includes threads.h 2017-12-07 17:29:42 +00:00
mapi meson: fix generated source inclusion on macOS and Windows 2017-11-30 15:09:21 +00:00
mesa mesa/spirv: move and rename nir_spirv_supported_capabilities 2017-12-07 17:15:11 +01:00
util meson: add dep_thread to every lib that includes threads.h 2017-12-07 17:29:42 +00:00
vulkan vulkan/wsi: Initialize individual WSI interfaces in wsi_device_init 2017-12-04 10:04:19 -08:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am wayland-drm: static inline wayland_drm_buffer_get 2017-11-08 14:40:12 +00:00
meson.build meson: build r600 driver 2017-11-28 14:06:33 -08:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00