nir/dce: perform DCE for unlooped instructions in a single pass
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 17 Nov 2020 17:44:11 +0000 (17:44 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 24 Feb 2021 09:58:59 +0000 (09:58 +0000)
commit71a985d80b1c29cced979b3c8d16f74463d1170b
treeadd4a83ecfbc090ae60bf43067285105bc541ea6
parent336bcbacd05d6fb7ec1aabab68773de17d081eed
nir/dce: perform DCE for unlooped instructions in a single pass

It's unnecessary to iterate twice for instructions outside loops.

Compile-time (nir_opt_dce):
Difference at 95.0% confidence
-630.64 +/- 6.18761
-27.0751% +/- 0.223134%
(Student's t, pooled s = 7.30785)

Compile-time (entire run):
Difference at 95.0% confidence
-749.54 +/- 48.8272
-1.82644% +/- 0.117838%
(Student's t, pooled s = 57.6672)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7691>
src/compiler/nir/nir_opt_dce.c