summaryrefslogtreecommitdiffhomepage
path: root/ir/be/becopyopt_t.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-07-13 07:56:30 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-07-13 23:03:55 +0200
commitc6571686bfbfb3c87ae24ae1dc568e685d6cd49a (patch)
treeb9e634dd910d10d30c893dc44f129021d26af6bd /ir/be/becopyopt_t.h
parentb402f0c11a621b8cb99d685afa5eb2f8c94a6fed (diff)
Use foreach_set() instead of reimplementing it.
Diffstat (limited to 'ir/be/becopyopt_t.h')
-rw-r--r--ir/be/becopyopt_t.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/ir/be/becopyopt_t.h b/ir/be/becopyopt_t.h
index ec61973..b5bf032 100644
--- a/ir/be/becopyopt_t.h
+++ b/ir/be/becopyopt_t.h
@@ -149,10 +149,7 @@ static inline affinity_node_t *get_affinity_info(const copy_opt_t *co, const ir_
return (affinity_node_t*)set_find(co->nodes, &find, sizeof(find), hash_irn(irn));
}
-#define co_gs_nodes_begin(co) set_first((co)->nodes)
-#define co_gs_nodes_next(co) set_next((co)->nodes)
-
-#define co_gs_foreach_aff_node(co, aff_node) for (aff_node = (affinity_node_t*)co_gs_nodes_begin(co); aff_node != NULL; aff_node = (affinity_node_t*)co_gs_nodes_next(co))
+#define co_gs_foreach_aff_node(co, aff_node) foreach_set((co)->nodes, affinity_node_t, (aff_node))
#define co_gs_foreach_neighb(aff_node, neighb) for (neighb = aff_node->neighbours; neighb != NULL; neighb = neighb->next)
#endif /* FIRM_BE_BECOPYOPT_T_H */