intel/nir: Call nir_opt_deref in brw_nir_optimize
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Jan 2019 20:33:17 +0000 (14:33 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 12 Jan 2019 23:55:49 +0000 (17:55 -0600)
It's an optimization so we should probably be calling it in the
optimization loop.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/compiler/brw_nir.c

index 749c00ebcc6d31bde640034bcd0d160836f04df9..92d7fe4bedebb962dcc76473c1cba4a2525acc99 100644 (file)
@@ -544,6 +544,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
       progress = false;
       OPT(nir_split_array_vars, nir_var_function);
       OPT(nir_shrink_vec_array_vars, nir_var_function);
+      OPT(nir_opt_deref);
       OPT(nir_lower_vars_to_ssa);
       if (allow_copies) {
          /* Only run this pass in the first call to brw_nir_optimize.  Later