summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepbqpcoloring.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2014-02-13 16:38:46 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2014-02-17 14:11:15 +0100
commit0ea8b7276a18cf5cdaa89cf6b054faa60086f9a0 (patch)
tree01d0462aed83d8b63097e7091b1feafde5f683b1 /ir/be/bepbqpcoloring.c
parentcc281f880e6e186609e3c0222dca4dfca968f1f6 (diff)
Add and use foreach_irn_pred{,_r}().
Diffstat (limited to 'ir/be/bepbqpcoloring.c')
-rw-r--r--ir/be/bepbqpcoloring.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ir/be/bepbqpcoloring.c b/ir/be/bepbqpcoloring.c
index 119f7a2..0facef7 100644
--- a/ir/be/bepbqpcoloring.c
+++ b/ir/be/bepbqpcoloring.c
@@ -238,13 +238,9 @@ static void create_affinity_edges(ir_node *irn, void *env)
be_pbqp_alloc_env_t *pbqp_alloc_env = (be_pbqp_alloc_env_t*)env;
const arch_register_class_t *cls = pbqp_alloc_env->cls;
const arch_register_req_t *req = arch_get_irn_register_req(irn);
- unsigned pos;
- unsigned max;
if (is_Phi(irn)) { /* Phis */
- for (pos = 0, max = get_irn_arity(irn); pos < max; ++pos) {
- ir_node *arg = get_irn_n(irn, pos);
-
+ foreach_irn_in(irn, pos, arg) {
if (!arch_irn_consider_in_reg_alloc(cls, arg))
continue;