i965/fs: Remove left-over 'removed' variable.
authorMatt Turner <mattst88@gmail.com>
Thu, 27 Mar 2014 18:35:49 +0000 (11:35 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 7 Apr 2014 17:29:43 +0000 (10:29 -0700)
I think this was used for coalescing out partly dead large virtual
registers, but the patch that enabled that caused regressions and didn't
make it upstream.

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

index c71fd47bbe7b497a6445606271992c6b28977644..6e30d16816d9dc32b158d0be9113e97ec9797bb8 100644 (file)
@@ -169,11 +169,8 @@ fs_visitor::register_coalesce()
       if (!can_coalesce)
          continue;
 
-      bool removed = false;
       for (int i = 0; i < src_size; i++) {
          if (mov[i]) {
-            removed = true;
-
             mov[i]->opcode = BRW_OPCODE_NOP;
             mov[i]->conditional_mod = BRW_CONDITIONAL_NONE;
             mov[i]->dst = reg_undef;
@@ -206,17 +203,15 @@ fs_visitor::register_coalesce()
          }
       }
 
-      if (removed) {
-         for (int i = 0; i < src_size; i++) {
-            live_intervals->start[var_to[i]] =
-               MIN2(live_intervals->start[var_to[i]],
-                    live_intervals->start[var_from[i]]);
-            live_intervals->end[var_to[i]] =
-               MAX2(live_intervals->end[var_to[i]],
-                    live_intervals->end[var_from[i]]);
-            reg_from = -1;
-         }
+      for (int i = 0; i < src_size; i++) {
+         live_intervals->start[var_to[i]] =
+            MIN2(live_intervals->start[var_to[i]],
+                 live_intervals->start[var_from[i]]);
+         live_intervals->end[var_to[i]] =
+            MAX2(live_intervals->end[var_to[i]],
+                 live_intervals->end[var_from[i]]);
       }
+      reg_from = -1;
    }
 
    foreach_list_safe(node, &this->instructions) {