summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2007-06-18 22:47:25 +0200
committerMatthias Braun <matze@braunis.de>2007-06-18 22:47:25 +0200
commit6d188d8d221878f81009f23c45c7f1df71475593 (patch)
treec85d72b632cc8fc2cc0c09467cf193f24ec7f937 /ir/be/besched.c
parentb1b2bef4c9c41fb88a3dc5c0346c837dfb23960b (diff)
fixed fpu problems, several x87 fixes
[r14635]
Diffstat (limited to 'ir/be/besched.c')
-rw-r--r--ir/be/besched.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ir/be/besched.c b/ir/be/besched.c
index b602716..a2d1234 100644
--- a/ir/be/besched.c
+++ b/ir/be/besched.c
@@ -137,8 +137,9 @@ ir_node *sched_skip(ir_node *from, int forward, sched_predicator_t *predicator,
//---------------------------------------------------------------------------
typedef struct remove_dead_nodes_env_t_ {
- ir_graph *irg;
bitset_t *reachable;
+ ir_graph *irg;
+ be_lv_t *lv;
} remove_dead_nodes_env_t;
/**
@@ -166,16 +167,21 @@ static void remove_dead_nodes_walker(ir_node *block, void *data)
if (bitset_is_set(env->reachable, get_irn_idx(node)))
continue;
+ if(env->lv)
+ be_liveness_remove(env->lv, node);
sched_remove(node);
be_kill_node(node);
}
}
-void be_remove_dead_nodes_from_schedule(ir_graph *irg)
+void be_remove_dead_nodes_from_schedule(be_irg_t *birg)
{
+ ir_graph *irg = be_get_birg_irg(birg);
+
remove_dead_nodes_env_t env;
- env.irg = irg;
env.reachable = bitset_alloca(get_irg_last_idx(irg));
+ env.lv = be_get_birg_liveness(birg);
+ env.irg = irg;
// mark all reachable nodes
irg_walk_graph(irg, mark_dead_nodes_walker, NULL, &env);