}
/* set color of all changed nodes */
- for (ns = (node_stat_t*)set_first(curr->changed_nodes); ns != NULL;
- ns = (node_stat_t*)set_next(curr->changed_nodes)) {
+ foreach_set(curr->changed_nodes, node_stat_t, ns) {
/* NO_COLOR is possible, if we had an undo */
if (ns->new_color != NO_COLOR) {
DBG((dbg, LEVEL_1, "\t color(%+F) := %d\n", ns->irn, ns->new_color));
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 */
{
if (tr_inh_trans_set) {
tr_inh_trans_tp *elt;
- for (elt = (tr_inh_trans_tp*)set_first(tr_inh_trans_set); elt != NULL;
- elt = (tr_inh_trans_tp*)set_next(tr_inh_trans_set)) {
+ foreach_set(tr_inh_trans_set, tr_inh_trans_tp, elt) {
del_pset(elt->directions[d_up]);
del_pset(elt->directions[d_down]);
}