i965: Move nir_lower_locals_to_regs a bit later.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 10 Aug 2016 01:02:46 +0000 (18:02 -0700)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 11 Jan 2017 22:47:29 +0000 (09:47 +1100)
I'm going to add a boolean scheduling pass that I want run late, but
after copy propagation and dead code elimination.  Yet, I don't want
to have to think about registers.  So, move the register conversion
a little later.

No impact on shader-db.  Suggested by Jason Ekstrand.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/drivers/dri/i965/brw_nir.c

index 474449818c79bc859029c030841d77759f487866..d01119095cc7110a5273414e933bda038520cb67 100644 (file)
@@ -619,12 +619,12 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
 
    OPT(nir_opt_algebraic_late);
 
-   OPT(nir_lower_locals_to_regs);
-
    OPT_V(nir_lower_to_source_mods);
    OPT(nir_copy_prop);
    OPT(nir_opt_dce);
 
+   OPT(nir_lower_locals_to_regs);
+
    if (unlikely(debug_enabled)) {
       /* Re-index SSA defs so we print more sensible numbers. */
       nir_foreach_function(function, nir) {