summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-10-22 08:59:06 -0600
committerBrian Paul <brianp@vmware.com>2010-10-22 08:59:06 -0600
commitdd2499b484b34e7efb8800f57c915c2f62ab1db4 (patch)
treed8c378fecbe4033bdef735b940be0c54c9141280 /src
parent67f6a4a8c46fa7cf0b337f3e937b4048a9fceb97 (diff)
mesa: move declaration before code
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/register_allocate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index a6aa7f39cb..ada6e35641 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -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;