summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorMatthias Braun <matthias.braun@kit.edu>2012-07-30 18:30:51 +0200
committerMatthias Braun <matthias.braun@kit.edu>2012-07-30 18:30:51 +0200
commit0a7d7324b9baa076d1322e82b92f8fc2c8f1892e (patch)
tree55f52998d7e35eff3ac31c5c5526a6aca84d1891 /ir/be/bestat.c
parent5d18527fff162c842c152aff38b6d28e4eddef8e (diff)
simplify and cleanup execfreq API
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index 3d25381..189c1ab 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -120,8 +120,7 @@ void be_do_stat_reg_pressure(ir_graph *irg, const arch_register_class_t *cls)
typedef struct estimate_irg_costs_env_t {
- ir_exec_freq *execfreqs;
- double costs;
+ double costs;
} estimate_irg_costs_env_t;
static void estimate_block_costs(ir_node *block, void *data)
@@ -133,15 +132,13 @@ static void estimate_block_costs(ir_node *block, void *data)
costs += arch_get_op_estimated_cost(node);
}
- env->costs += costs * get_block_execfreq(env->execfreqs, block);
+ env->costs += costs * get_block_execfreq(block);
}
-double be_estimate_irg_costs(ir_graph *irg, ir_exec_freq *execfreqs)
+double be_estimate_irg_costs(ir_graph *irg)
{
estimate_irg_costs_env_t env;
-
- env.execfreqs = execfreqs;
- env.costs = 0.0;
+ env.costs = 0.0;
irg_block_walk_graph(irg, estimate_block_costs, NULL, &env);