Mesa (master): mesa: move declaration before code
Brian Paul
brianp at kemper.freedesktop.org
Fri Oct 22 14:59:16 UTC 2010
Module: Mesa
Branch: master
Commit: dd2499b484b34e7efb8800f57c915c2f62ab1db4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd2499b484b34e7efb8800f57c915c2f62ab1db4
Author: Brian Paul <brianp at vmware.com>
Date: Fri Oct 22 08:59:06 2010 -0600
mesa: move declaration before code
---
src/mesa/program/register_allocate.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index a6aa7f3..ada6e35 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;
More information about the mesa-commit
mailing list