nir: remove simple dead if detection from nir_opt_dead_cf()
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 14 Feb 2019 01:27:25 +0000 (12:27 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 15 Feb 2019 23:45:31 +0000 (10:45 +1100)
commita801196ec9c200318a667021d1b4e0820228a507
treed6f9ded3bfa307d751d9f33669638672fd695d1b
parentf695e433542847cc396b6b55c6f6e912a196a107
nir: remove simple dead if detection from nir_opt_dead_cf()

This was probably useful when it was first written, however it
looks to be no longer necessary.

As far as I can tell these days dce is smart enough to remove useless
instructions from if branches. Once this is done
nir_opt_peephole_select() will end up removing the empty if.

Removing this support reduces the dolphin uber shader compilation
time spent in nir_opt_dead_cf() by a little over 7x.

No shader-db changes on i965 or radeonsi.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_opt_dead_cf.c