added get_next_ir_opcodes() to allow allocation of cosecutive opcodes
[libfirm] / ir / be / beifg.c
index d59302c..76ca11c 100644 (file)
 #include "irprintf.h"
 #include "beifg_t.h"
 
-size_t (be_ifg_iter_size)(const void *self)
+size_t (be_ifg_nodes_iter_size)(const void *self)
 {
        const be_ifg_t *ifg = self;
-       return ifg->impl->iter_size;
+       return ifg->impl->nodes_iter_size;
+}
+
+size_t (be_ifg_neighbours_iter_size)(const void *self)
+{
+       const be_ifg_t *ifg = self;
+       return ifg->impl->neighbours_iter_size;
 }
 
 void (be_ifg_free)(void *self)
@@ -55,6 +61,12 @@ ir_node *(be_ifg_neighbours_next)(const void *self, void *iter)
        return ifg->impl->neighbours_next(self, iter);
 }
 
+void (be_ifg_neighbours_break)(const void *self, void *iter)
+{
+       const be_ifg_t *ifg = self;
+       ifg->impl->neighbours_break(self, iter);
+}
+
 ir_node *(be_ifg_nodes_begin)(const void *self, void *iter)
 {
        const be_ifg_t *ifg = self;
@@ -67,6 +79,12 @@ ir_node *(be_ifg_nodes_next)(const void *self, void *iter)
        return ifg->impl->nodes_next(self, iter);
 }
 
+void (be_ifg_nodes_break)(const void *self, void *iter)
+{
+       const be_ifg_t *ifg = self;
+       ifg->impl->nodes_break(self, iter);
+}
+
 int (be_ifg_degree)(const void *self, const ir_node *irn)
 {
        const be_ifg_t *ifg = self;
@@ -77,7 +95,7 @@ int (be_ifg_degree)(const void *self, const ir_node *irn)
 int be_ifg_is_simplicial(const be_ifg_t *ifg, const ir_node *irn)
 {
        int degree = be_ifg_degree(ifg, irn);
-       void *iter = be_ifg_iter_alloca(ifg);
+       void *iter = be_ifg_neighbours_iter_alloca(ifg);
 
        ir_node **neighbours = malloc(degree * sizeof(neighbours[0]));
 
@@ -100,10 +118,10 @@ int be_ifg_is_simplicial(const be_ifg_t *ifg, const ir_node *irn)
        return 1;
 }
 
-void be_fg_check(const be_ifg_t *ifg)
+void be_ifg_check(const be_ifg_t *ifg)
 {
-       void *iter1 = be_ifg_iter_alloca(ifg);
-       void *iter2 = be_ifg_iter_alloca(ifg);
+       void *iter1 = be_ifg_nodes_iter_alloca(ifg);
+       void *iter2 = be_ifg_neighbours_iter_alloca(ifg);
 
        ir_node *n, *m;