i965/fs: Return progress from move_interpolation_to_top().
authorMatt Turner <mattst88@gmail.com>
Thu, 9 Mar 2017 19:05:08 +0000 (11:05 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 23 Mar 2017 21:34:44 +0000 (14:34 -0700)
And mark as static at the same time.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs.cpp

index c410efc29d6353b7b097c67aa2140fafb36d9531..099b09b5dd19bba547f39db5a12678ebcd4d0952 100644 (file)
@@ -6293,9 +6293,11 @@ computed_depth_mode(const nir_shader *shader)
  *
  * This should be replaced by global value numbering someday.
  */
-void
+static bool
 move_interpolation_to_top(nir_shader *nir)
 {
+   bool progress = false;
+
    nir_foreach_function(f, nir) {
       if (!f->impl)
          continue;
@@ -6339,6 +6341,7 @@ move_interpolation_to_top(nir_shader *nir)
                      exec_list_push_head(&top->instr_list, &move[i]->node);
                   }
                   cursor_node = &move[i]->node;
+                  progress = true;
                }
             }
          }
@@ -6347,6 +6350,8 @@ move_interpolation_to_top(nir_shader *nir)
                             ((unsigned) nir_metadata_block_index |
                              (unsigned) nir_metadata_dominance));
    }
+
+   return progress;
 }
 
 /**