From: Brian Paul Date: Wed, 26 Jun 2013 19:36:38 +0000 (-0600) Subject: mesa: move declarations before code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d43548ca370f2653ad0a103596d5dcfcb20683dd;p=mesa.git mesa: move declarations before code Reviewed-by: Jose Fonseca --- diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c index ea06a07c6af..4eed0b5aab7 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;