intel/nir: Move lower_mem_access_bit_sizes to postprocess_nir
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 12 Jan 2019 02:19:18 +0000 (20:19 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 9 Mar 2019 04:03:14 +0000 (22:03 -0600)
It doesn't really matter where this pass goes as long as it's after we
call nir_lower_explicit_io and before we go into the back-end.  Putting
it brw_postprocess_nir lets us move nir_lower_explicit_io significantly
later in the pipeline.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/compiler/brw_nir.c

index 0f92994769640643a37ee4a4950b66baf1ea2f76..ae239de6117ae6d936b6603c571ee7b38b15fadf 100644 (file)
@@ -740,8 +740,6 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
       brw_nir_no_indirect_mask(compiler, nir->info.stage);
    OPT(nir_lower_indirect_derefs, indirect_mask);
 
-   OPT(brw_nir_lower_mem_access_bit_sizes);
-
    /* Get rid of split copies */
    nir = brw_nir_optimize(nir, compiler, is_scalar, false);
 
@@ -809,6 +807,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
 
    UNUSED bool progress; /* Written by OPT */
 
+   OPT(brw_nir_lower_mem_access_bit_sizes);
 
    do {
       progress = false;