nir/vars_to_ssa: Properly ignore variables with complex derefs
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Mar 2019 18:12:48 +0000 (12:12 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 31 May 2019 01:08:03 +0000 (01:08 +0000)
commitcc59503b161424f4d1e3f7214967233be9e1f093
tree2c1ffed32bea5e3f9769a9618fc2d49455ec1696
parent911ea2c66fc54c5066707f7fe4451ec573792ae7
nir/vars_to_ssa: Properly ignore variables with complex derefs

Because the core principle of the vars_to_ssa pass is that it globally
(within a function) looks at all of the uses of a never-indirected path
and does a full into-SSA on that path, it can't handle a path which has
any chance of having aliasing.  If a function_temp variable has a cast
or anything else which may cause aliasing, we have to assume that all
paths to that variable may alias and ignore the entire variable.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir/nir_lower_vars_to_ssa.c