mesa/src
Caio Marcelo de Oliveira Filho 8571c577aa nir/dead_cf: also remove useless ifs
Generalize the code for remove dead loops to also remove dead if
nodes. The conditions are the same in both cases, if the node (and
it's children) don't have side-effects AND the nodes after it don't
use the values produced by the node.

The only difference is when evaluating side effects: loops consider
only return jumps as a side-effect -- they can stop execution of nodes
after it; 'if' nodes outside loops should consider all kinds of
jumps (return, break, continue) since all of them can cause execution
of nodes after it to be skipped.

After this patch, empty ifs (those which both then and else blocks are
empty) will be removed by nir_opt_dead_cf.

It caused no change to shader-db, in part because the removal of empty
ifs is currently covered by nir_opt_peephole_select.

v2: Improve the identification of cases where break/continue can cause
    side-effects. (Jason)

v3: Move code comment changes to a different patch. (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-03-21 09:36:09 -07:00
..
amd radv: add support for VK_EXT_depth_range_unrestricted 2018-03-20 21:55:41 +01:00
broadcom broadcom/vc5: Don't annotate dumps with stale live intervals. 2018-03-19 16:44:20 -07:00
compiler nir/dead_cf: also remove useless ifs 2018-03-21 09:36:09 -07:00
egl dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
gallium radeon/vce: move feedback command inside of destroy function 2018-03-21 11:24:35 -04:00
gbm meson: Use include directory variables instead of traversing 2018-03-07 13:30:53 -08:00
getopt
glx dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
gtest autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
hgl meson: Add Haiku platform support v4 2018-02-16 16:56:34 -06:00
intel intel: genxml: add INSTPM/CS_DEBUG_MODE2 registers 2018-03-20 16:58:30 +00:00
loader dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
mapi *-symbol-check: use correct nm path when cross-compiling 2018-02-26 13:50:59 +00:00
mesa intel/blorp: Fix compiler warning about num_layers. 2018-03-20 14:06:46 -07:00
util util: Use set_foreach instead of rolling our own 2018-03-14 20:03:57 +01:00
vulkan dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
meson.build meson: fix building without GL 2018-02-26 09:32:14 -08:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00