nir: use nir_foreach_ssa_def for indexing ssa defs
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 4 Feb 2015 05:04:57 +0000 (21:04 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Feb 2015 01:06:17 +0000 (17:06 -0800)
commite025943134ada9dad02926e8191dd1bd2e7fc95e
tree7bdc188c1b1a466b6d0eb0ff2bbc6846bb455d2e
parent0167c38cacc00eef77d7f83d3929cdbc99378d11
nir: use nir_foreach_ssa_def for indexing ssa defs

This is both simpler and more correct.  The old code didn't properly index
load_const instructions.

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