summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bechordal_common.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2012-11-27 17:49:06 +0100
committerMatthias Braun <matze@braunis.de>2012-11-28 11:27:13 +0100
commit1376e7ac003f5d209b72056c62798cbb6d928de3 (patch)
treebd332d20cdcf4d1b710ca5ccc3c453734315b674 /ir/be/bechordal_common.c
parentae1da4394ecac110c79fdf1f07cbca598c1ef4be (diff)
introduce be_foreach_use and use it
Diffstat (limited to 'ir/be/bechordal_common.c')
-rw-r--r--ir/be/bechordal_common.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/ir/be/bechordal_common.c b/ir/be/bechordal_common.c
index 824d86d..7e7f84e 100644
--- a/ir/be/bechordal_common.c
+++ b/ir/be/bechordal_common.c
@@ -157,22 +157,18 @@ void create_borders(ir_node *block, void *env_ptr)
* If the node is no phi node we can examine the uses.
*/
if (!is_Phi(irn)) {
- for (int i = 0, n = get_irn_arity(irn); i < n; ++i) {
- ir_node *op = get_irn_n(irn, i);
-
- if (arch_irn_consider_in_reg_alloc(env->cls, op)) {
- int nr = get_irn_idx(op);
- const char *msg = "-";
-
- if (!bitset_is_set(live, nr)) {
- border_use(op, step, 1);
- bitset_set(live, nr);
- msg = "X";
- }
-
- DBG((dbg, LEVEL_4, "\t\t%s pos: %d, use: %+F\n", msg, i, op));
+ be_foreach_use(irn, env->cls, in_req_, op, op_req_,
+ unsigned idx = get_irn_idx(op);
+ const char *msg = "-";
+
+ if (!bitset_is_set(live, idx)) {
+ border_use(op, step, 1);
+ bitset_set(live, idx);
+ msg = "X";
}
- }
+
+ DB((dbg, LEVEL_4, "\t\t%s pos: %d, use: %+F\n", msg, i_, op));
+ );
}
++step;
}