i965/vec4: Use nir_move_vec_src_uses_to_dest
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 8 Sep 2015 23:45:57 +0000 (16:45 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 17 Sep 2015 15:21:31 +0000 (08:21 -0700)
commitfc11dbe13f3470ff2a4cb91c6b063db2456664da
tree71405e7f421887251bb5eb476fe97307a9124fc9
parenta6c467d6c574baf6636814b51f1dafe2557e22f6
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 <elima@igalia.com>
src/mesa/drivers/dri/i965/brw_nir.c