summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bechordal_common.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2012-11-27 17:44:54 +0100
committerMatthias Braun <matze@braunis.de>2012-11-28 11:27:13 +0100
commitae1da4394ecac110c79fdf1f07cbca598c1ef4be (patch)
treef80bd4da393138b212e0b1a7c5c0c28d413f2916 /ir/be/bechordal_common.c
parentb731214f8067006ee8c5ed026cd85f6d04592345 (diff)
more be_foreach_definition usage
Diffstat (limited to 'ir/be/bechordal_common.c')
-rw-r--r--ir/be/bechordal_common.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/ir/be/bechordal_common.c b/ir/be/bechordal_common.c
index 0ccb396..824d86d 100644
--- a/ir/be/bechordal_common.c
+++ b/ir/be/bechordal_common.c
@@ -140,36 +140,18 @@ void create_borders(ir_node *block, void *env_ptr)
* relevant for the interval borders.
*/
sched_foreach_reverse(block, irn) {
- DBG((dbg, LEVEL_1, "\tinsn: %+F, pressure: %d\n", irn, pressure));
- DBG((dbg, LEVEL_2, "\tlive: %B\n", live));
-
- if (get_irn_mode(irn) == mode_T) {
- foreach_out_edge(irn, edge) {
- ir_node *proj = get_edge_src_irn(edge);
-
- /*
- * If the node defines some value, which can put into a
- * register of the current class, make a border for it.
- */
- if (arch_irn_consider_in_reg_alloc(env->cls, proj)) {
- int nr = get_irn_idx(proj);
-
- bitset_clear(live, nr);
- border_def(proj, step, 1);
- }
- }
- } else {
+ DB((dbg, LEVEL_1, "\tinsn: %+F, pressure: %d\n", irn, pressure));
+ DB((dbg, LEVEL_2, "\tlive: %B\n", live));
+
+ be_foreach_definition(irn, env->cls, def,
/*
* If the node defines some value, which can put into a
* register of the current class, make a border for it.
*/
- if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
- int nr = get_irn_idx(irn);
-
- bitset_clear(live, nr);
- border_def(irn, step, 1);
- }
- }
+ unsigned idx = get_irn_idx(def);
+ bitset_clear(live, idx);
+ border_def(def, step, 1);
+ );
/*
* If the node is no phi node we can examine the uses.