intel/nir, freedreno/ir3: Use the separated dead write vars pass
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 30 Aug 2018 00:26:03 +0000 (17:26 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 16 Oct 2018 00:29:46 +0000 (17:29 -0700)
No changes to shader-db for intel.
No changes to shader-db expected for freedreno.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/gallium/drivers/freedreno/ir3/ir3_nir.c
src/intel/compiler/brw_nir.c

index db1d74fdee766c732874e30c23c6a17c1d001135..d5f42f2a231be72187e3cfb8fc79ad9a0651ad5c 100644 (file)
@@ -94,6 +94,7 @@ ir3_optimize_loop(nir_shader *s)
 
                OPT_V(s, nir_lower_vars_to_ssa);
                progress |= OPT(s, nir_opt_copy_prop_vars);
+               progress |= OPT(s, nir_opt_dead_write_vars);
                progress |= OPT(s, nir_lower_alu_to_scalar);
                progress |= OPT(s, nir_lower_phis_to_scalar);
 
index f61baee230a3ec8827f53362134dbd6d9a23d936..297845b89b7d093ed631052f618477b69d7ffd32 100644 (file)
@@ -553,6 +553,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
          OPT(nir_opt_find_array_copies);
       }
       OPT(nir_opt_copy_prop_vars);
+      OPT(nir_opt_dead_write_vars);
 
       if (is_scalar) {
          OPT(nir_lower_alu_to_scalar);