nir: Add a foreach_ssa_def function
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Dec 2014 23:12:59 +0000 (15:12 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:20:22 +0000 (07:20 -0800)
commit193fea9eb6a7ad72360a3ac65b322bab081f9587
treeecad1e92bda6a4ff6cf91aad7ece7ca99d172715
parentbc0735857f1f36eede7e8e5382f8e9bbc496fecb
nir: Add a foreach_ssa_def function

There are some functions whose destinations are SSA-only and so aren't a
nir_dest.  This provides a function that is capable of iterating over the
SSA definitions defined by those functions.  If you want registers, you
should use the old iterator.

v2: Kenneth Graunke <kenneth@whitecape.org>:
 - Fix nir_foreach_ssa_def's return value.

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