nir/copy_prop_vars: keep track of components in copy_entry
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 14 Jan 2019 20:26:30 +0000 (12:26 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 23 Feb 2019 05:00:50 +0000 (21:00 -0800)
commitfdcb9779d921878fc8908930a1e589afdfc5c5f4
tree50b26f70143831cd48b7b2198f880723e219cf9d
parent6624decbb5d842fa1885f17cfdeec3fbcf44fcd9
nir/copy_prop_vars: keep track of components in copy_entry

When a copy_entry is SSA, store not only the nir_ssa_def* for each
component, but also the source component they come from.  At the
moment this is always a match (i.e. 'component[i] == i'), because all
the operations for a copy_entry happen using definitions with the same
size.  This prepares the code for array_derefs of vectors, in which
'component[i] != i'.

Also, extract setting all SSA components into a function of its own.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_copy_prop_vars.c