Module: Mesa
Branch: master
Commit: fc11dbe13f3470ff2a4cb91c6b063db2456664da
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc11dbe13f3470ff2a4cb91c6b063db2456664da

Author: Jason Ekstrand <[email protected]>
Date:   Tue Sep  8 16:45:57 2015 -0700

i965/vec4: Use nir_move_vec_src_uses_to_dest

The idea here is not that it gives register coalescing a little bit of a
helping hand.  It doesn't actually fix the coalescing problems, but it
seems to help a good bit.

Shader-db results for vec4 programs on Haswell:

   total instructions in shared programs: 1746280 -> 1683959 (-3.57%)
   instructions in affected programs:     1259166 -> 1196845 (-4.95%)
   helped:                                11363
   HURT:                                  148

v2 (Jason Ekstrand):
 - Run nir_move_vec_src_uses_to_dest after going out of SSA
 - New shader-db numbers

Reviewed-by: Eduardo Lima Mitev <[email protected]>

---

 src/mesa/drivers/dri/i965/brw_nir.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_nir.c 
b/src/mesa/drivers/dri/i965/brw_nir.c
index f326b23..9a0bbb0 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -187,6 +187,9 @@ brw_create_nir(struct brw_context *brw,
    nir_validate_shader(nir);
 
    if (!is_scalar) {
+      nir_move_vec_src_uses_to_dest(nir);
+      nir_validate_shader(nir);
+
       nir_lower_vec_to_movs(nir);
       nir_validate_shader(nir);
    }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to