nir: Add a function to detect if a block is immediately followed by an if
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 29 Oct 2014 23:25:51 +0000 (16:25 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:19:00 +0000 (07:19 -0800)
commitd7e482d32cf0188a1ed49e76f008837be5cfd720
tree930b26ec87e89af39d2894f81758a07e20dd6e41
parentdfdf0c46732dd20b5796778dc446fb0a34649f1e
nir: Add a function to detect if a block is immediately followed by an if

Since we don't actually have an "if" instruction, this is a very common
pattern when iterating over instructions.  This adds a helper function for
it to make things a little less painful.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir.c
src/glsl/nir/nir.h
src/glsl/nir/nir_from_ssa.c
src/glsl/nir/nir_opt_dce.c