intel/compiler: Update block IPs once in dead_code_eliminate
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 29 Jun 2021 02:02:40 +0000 (19:02 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 14 Jul 2021 16:57:01 +0000 (09:57 -0700)
commitf3f3817307c0a4e04dc340331361f5f31d45d3c8
treefbf25fa873c40b2f32ca7524c08148e9195350f1
parent8ca1bc5f947d17483f778c3abec99ca9f225b748
intel/compiler: Update block IPs once in dead_code_eliminate

Performance improvement in
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13 for n=30:

release build (w/Fedora build flags): -7.79% ± 0.25%
Meson -Dbuildtype=debugoptimized:     -5.10% ± 0.40%

The difference in the debugoptimized build is the calls to
inst_is_in_block(block, this) still exist on each call to remove().

v2: Only update each block's IP data once instead of once per block.
Suggested by Emma.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
src/intel/compiler/brw_fs_dead_code_eliminate.cpp