Mesa (master): mesa: move declarations before code

Brian Paul brianp at kemper.freedesktop.org
Thu Jun 27 15:46:14 UTC 2013


Module: Mesa
Branch: master
Commit: d43548ca370f2653ad0a103596d5dcfcb20683dd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d43548ca370f2653ad0a103596d5dcfcb20683dd

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jun 26 13:36:38 2013 -0600

mesa: move declarations before code

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/mesa/program/register_allocate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index ea06a07..4eed0b5 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -630,9 +630,10 @@ ra_get_best_spill_node(struct ra_graph *g)
     * colored that we couldn't manage to color in ra_select().
     */
    for (i = g->stack_optimistic_start; i < g->stack_count; i++) {
+      float cost, benefit;
+
       n = g->stack[i];
-      float cost = g->nodes[n].spill_cost;
-      float benefit;
+      cost = g->nodes[n].spill_cost;
 
       if (cost <= 0.0)
          continue;




More information about the mesa-commit mailing list