[Mesa-dev] [PATCH 5/6] i965: Move nir_lower_locals_to_regs a bit later.

Kenneth Graunke kenneth at whitecape.org
Wed Aug 10 02:30:18 UTC 2016


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 at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index d12a946..db2056d 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -484,12 +484,12 @@ brw_postprocess_nir(nir_shader *nir,
 
    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) {
-- 
2.9.0



More information about the mesa-dev mailing list