mesa/src/intel
Francisco Jerez 11674dad8a intel/fs: Optimize and simplify the copy propagation dataflow logic.
Previously the dataflow propagation algorithm would calculate the ACP
live-in and -out sets in a two-pass fixed-point algorithm.  The first
pass would update the live-out sets of all basic blocks of the program
based on their live-in sets, while the second pass would update the
live-in sets based on the live-out sets.  This is incredibly
inefficient in the typical case where the CFG of the program is
approximately acyclic, because it can take up to 2*n passes for an ACP
entry introduced at the top of the program to reach the bottom (where
n is the number of basic blocks in the program), until which point the
algorithm won't be able to reach a fixed point.

The same effect can be achieved in a single pass by computing the
live-in and -out sets in lock-step, because that makes sure that
processing of any basic block will pick up the updated live-out sets
of the lexically preceding blocks.  This gives the dataflow
propagation algorithm effectively O(n) run-time instead of O(n^2) in
the acyclic case.

The time spent in dataflow propagation is reduced by 30x in the
GLES31.functional.ssbo.layout.random.all_shared_buffer.5 dEQP
test-case on my CHV system (the improvement is likely to be of the
same order of magnitude on other platforms).  This more than reverses
an apparent run-time regression in this test-case from my previous
copy-propagation undefined-value handling patch, which was ultimately
caused by the additional work introduced in that commit to account for
undefined values being multiplied by a huge quadratic factor.

According to Chad this test was failing on CHV due to a 30s time-out
imposed by the Android CTS (this was the case regardless of my
undefined-value handling patch, even though my patch substantially
exacerbated the issue).  On my CHV system this patch reduces the
overall run-time of the test by approximately 12x, getting us to
around 13s, well below the time-out.

v2: Initialize live-out set to the universal set to avoid rather
    pessimistic dataflow estimation in shaders with cycles (Addresses
    performance regression reported by Eero in GpuTest Piano).
    Performance numbers given above still apply.  No shader-db changes
    with respect to master.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104271
Reported-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-01-17 11:56:08 -08:00
..
blorp meson: Use dependencies for nir 2018-01-11 15:40:02 -08:00
common intel/batch-decoder: Decode vertex and index buffers 2017-12-14 13:27:13 -08:00
compiler intel/fs: Optimize and simplify the copy propagation dataflow logic. 2018-01-17 11:56:08 -08:00
genxml meson: don't use intermediate variables that are immediately discarded 2018-01-11 15:40:02 -08:00
isl meson: don't use intermediate variables that are immediately discarded 2018-01-11 15:40:02 -08:00
tools aubinator: add support for aubinating memtrace aubs 2018-01-08 21:11:11 -08:00
vulkan vulkan: move anv VK_EXT_debug_report implementation to common code. 2018-01-17 11:27:52 +01:00
Android.blorp.mk intel: android: remove libdrm_intel requirement 2017-03-30 19:07:23 +01:00
Android.common.mk android: link libmesa_intel_common with zlib and expat 2017-08-02 10:30:50 +03:00
Android.compiler.mk android: fix build issues with brw_nir_trig_workarounds.c 2017-10-04 07:39:05 +03:00
Android.genxml.mk i965/cnl: Wire up android Mesa build files for gen10 2017-06-09 16:02:58 -07:00
Android.isl.mk i965/cnl: Wire up android Mesa build files for gen10 2017-06-09 16:02:58 -07:00
Android.mk intel/vulkan: Get rid of recursive make 2017-03-13 11:16:35 +00:00
Android.vulkan.mk anv: Install as Vulkan HAL module in Android.mk build 2017-10-18 00:23:38 -07:00
Makefile.am autotools: Set C++ visibility flags on Intel 2017-11-10 09:41:55 -08:00
Makefile.blorp.am blorp: automake: add TODO to the tarball 2017-02-24 17:37:00 +00:00
Makefile.common.am automake: intel: correctly append to the LIBADD variable 2017-11-08 14:23:57 +00:00
Makefile.compiler.am intel: use a flag instead of setting PYTHONPATH 2017-09-27 09:07:28 -07:00
Makefile.genxml.am intel: genxml: automake: include gen_bits_header.py in the tarball 2017-04-05 13:16:28 +01:00
Makefile.isl.am i965/cnl: Wire up Mesa build files for gen10 2017-06-09 16:02:58 -07:00
Makefile.sources vulkan: move anv VK_EXT_debug_report implementation to common code. 2018-01-17 11:27:52 +01:00
Makefile.tools.am intel/tools: Convert aubinator over to the common framework 2017-12-14 13:27:24 -08:00
Makefile.vulkan.am anv: Implement VK_ANDROID_native_buffer (v9) 2017-10-18 00:23:38 -07:00
meson.build meson: Add build Intel "anv" vulkan driver 2017-09-27 09:12:19 -07:00