i965/fs: Reset reg_from when we can't coalesce.
authorMatt Turner <mattst88@gmail.com>
Wed, 9 Apr 2014 21:04:10 +0000 (14:04 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 11 Apr 2014 22:27:46 +0000 (15:27 -0700)
Not setting this would prevented coalescing after a failed attempt if
the sources for both MOVs were the same.

total instructions in shared programs: 1654531 -> 1650224 (-0.26%)
instructions in affected programs:     423167 -> 418860 (-1.02%)
GAINED:                                2
LOST:                                  0

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp

index 6e30d16816d9dc32b158d0be9113e97ec9797bb8..4e3b611197ad823ff2f8c2c50f13f3f96458fb3a 100644 (file)
@@ -162,6 +162,7 @@ fs_visitor::register_coalesce()
          if (!can_coalesce_vars(live_intervals, &instructions, inst,
                                 var_to[i], var_from[i])) {
             can_coalesce = false;
+            reg_from = -1;
             break;
          }
       }