nir/opt_remove_phis: optimize out phis with undef
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 17 Aug 2020 11:18:24 +0000 (12:18 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Aug 2020 13:27:50 +0000 (13:27 +0000)
commit60dae98456830a6a1d0b28e22555e9faec948a32
tree259be7882a0ce08376fb9ba7c7b21c65bcd83333
parent326eb56718925828e886f40f72ea4a97b4657196
nir/opt_remove_phis: optimize out phis with undef

This removes some phis that loop unrolling can create.

fossil-db (Navi):
Totals from 349 (0.26% of 135946) affected shaders:
SpillSGPRs: 52 -> 41 (-21.15%)
CodeSize: 3179968 -> 3169920 (-0.32%); split: -0.33%, +0.01%
Instrs: 626965 -> 624712 (-0.36%); split: -0.37%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6348>
src/compiler/nir/nir_opt_remove_phis.c