summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-07-02 18:58:18 +0200
committerMatthias Braun <matze@braunis.de>2010-07-02 18:58:18 +0200
commit7a178059678ff6c6094a7cd8fac5644367417102 (patch)
treece3e2c5bee4d6c409b96043cbda8384165c29505 /ir/be/bestat.c
parent18814151f8c0ea17b2a7bf84c82ee3c2e66d6a6b (diff)
change register allocator and related interfaces to use ir_graph* instead of be_irg_t*
[r27692]
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index b9e4ec3..2f9453a 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -48,7 +48,7 @@
typedef struct pressure_walker_env_t pressure_walker_env_t;
struct pressure_walker_env_t {
- be_irg_t *birg;
+ ir_graph *irg;
be_lv_t *lv;
double insn_count;
double regpressure;
@@ -60,8 +60,7 @@ static void check_reg_pressure_class(pressure_walker_env_t *env,
ir_node *block,
const arch_register_class_t *cls)
{
- be_irg_t *birg = env->birg;
- ir_graph *irg = be_get_birg_irg(birg);
+ ir_graph *irg = env->irg;
ir_node *irn;
ir_nodeset_t live_nodes;
int max_live;
@@ -100,13 +99,12 @@ static void stat_reg_pressure_block(ir_node *block, void *data)
check_reg_pressure_class(env, block, env->cls);
}
-void be_do_stat_reg_pressure(be_irg_t *birg, const arch_register_class_t *cls)
+void be_do_stat_reg_pressure(ir_graph *irg, const arch_register_class_t *cls)
{
pressure_walker_env_t env;
- ir_graph *irg = be_get_birg_irg(birg);
double average_pressure;
- env.birg = birg;
+ env.irg = irg;
env.insn_count = 0;
env.max_pressure = 0;
env.regpressure = 0;
@@ -184,10 +182,10 @@ static void node_stat_walker(ir_node *irn, void *data)
}
}
-void be_collect_node_stats(be_node_stats_t *new_stats, be_irg_t *birg)
+void be_collect_node_stats(be_node_stats_t *new_stats, ir_graph *irg)
{
memset(new_stats, 0, sizeof(*new_stats));
- irg_walk_graph(birg->irg, NULL, node_stat_walker, new_stats);
+ irg_walk_graph(irg, NULL, node_stat_walker, new_stats);
}
void be_subtract_node_stats(be_node_stats_t *stats, be_node_stats_t *sub)