mesa: move declaration before code
authorBrian Paul <brianp@vmware.com>
Fri, 22 Oct 2010 14:59:06 +0000 (08:59 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 22 Oct 2010 14:59:06 +0000 (08:59 -0600)
src/mesa/program/register_allocate.c

index a6aa7f39cbe219ad973f7bcb6a3b7a9144b9ce90..ada6e356419c9fd12007f898756d6e04c2b227c4 100644 (file)
@@ -398,11 +398,12 @@ ra_get_best_spill_node(struct ra_graph *g)
 
    for (n = 0; n < g->count; n++) {
       float cost = g->nodes[n].spill_cost;
+      float benefit;
 
       if (cost <= 0.0)
         continue;
 
-      float benefit = ra_get_spill_benefit(g, n);
+      benefit = ra_get_spill_benefit(g, n);
 
       if (benefit / cost > best_benefit) {
         best_benefit = benefit / cost;