summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-07-13 10:08:20 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-07-13 23:03:58 +0200
commit6153d2198a2cf1234c50acc744243306bd9ab1a5 (patch)
tree7e387c9698880043770bc35b96c60dd3642a6e7b /ir/be/bestat.c
parent5619c9122551713adbefc33977572639408dd8b9 (diff)
Let sched_foreach_from() and sched_foreach_reverse_from() declare their iterator variables.
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index b65552a..3d25381 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -59,10 +59,9 @@ static void check_reg_pressure_class(pressure_walker_env_t *env,
ir_node *block,
const arch_register_class_t *cls)
{
- ir_graph *irg = env->irg;
- ir_node *irn;
- ir_nodeset_t live_nodes;
- size_t max_live;
+ ir_graph *irg = env->irg;
+ ir_nodeset_t live_nodes;
+ size_t max_live;
ir_nodeset_init(&live_nodes);
be_liveness_end_of_block(env->lv, cls, block, &live_nodes);
@@ -128,8 +127,7 @@ typedef struct estimate_irg_costs_env_t {
static void estimate_block_costs(ir_node *block, void *data)
{
estimate_irg_costs_env_t *env = (estimate_irg_costs_env_t*)data;
- ir_node *node;
- double costs = 0.0;
+ double costs = 0.0;
sched_foreach(block, node) {
costs += arch_get_op_estimated_cost(node);