nir/copy_prop_vars: prefer using entries from equal derefs
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 29 Jan 2019 20:39:28 +0000 (12:39 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 1 Mar 2019 07:55:31 +0000 (23:55 -0800)
commit6c0de78cc257240b5e55e033b4df8d7d87dcdfa7
tree531b4bcb1418daae53f2ea155b3ad516b8b75c72
parent61965afd00af44e5f7c08710e8cd00f4e23b1e7c
nir/copy_prop_vars: prefer using entries from equal derefs

When looking up an entry to use, always prefer an equal match, as it
more likely to contain reusable SSA or derefs to propagate.

This will be necessary when adding entries with array derefs of
vectors, because we don't want the vector if the equal entry (an array
deref of that vector) is present.

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