beinfo: Remove declaration of the non-existent function be_info_duplicate().
[libfirm] / ir / be / becopyopt_t.h
index af4642e..7abaf02 100644 (file)
@@ -59,7 +59,7 @@ struct copy_opt_t {
 
 static inline unsigned get_irn_col(const ir_node *node)
 {
-       return arch_register_get_index(arch_get_irn_register(node));
+       return arch_get_irn_register(node)->index;
 }
 
 static inline void set_irn_col(const arch_register_class_t *cls, ir_node *node,
@@ -146,14 +146,10 @@ static inline affinity_node_t *get_affinity_info(const copy_opt_t *co, const ir_
        ASSERT_GS_AVAIL(co);
 
        find.irn = irn;
-       return (affinity_node_t*)set_find(co->nodes, &find, sizeof(find), hash_irn(irn));
+       return set_find(affinity_node_t, 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_nodes_break(co)         set_break((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_neighb(aff_node, neighb)   for (neighb = (neighb_t*)aff_node->neighbours; neighb != NULL; neighb = (neighb_t*)neighb->next)
+#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_t *neighb = aff_node->neighbours; neighb; neighb = neighb->next)
 
 #endif /* FIRM_BE_BECOPYOPT_T_H */