+void (be_ifg_cliques_break)(const void *self, void *iter)
+{
+ const be_ifg_t *ifg = self;
+ ifg->impl->cliques_break(self, iter);
+}
+
+int (be_ifg_degree)(const void *self, const ir_node *irn)
+{
+ const be_ifg_t *ifg = self;
+ return ifg->impl->degree(self, 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_neighbours_iter_alloca(ifg);
+
+ ir_node **neighbours = xmalloc(degree * sizeof(neighbours[0]));
+
+ ir_node *curr;
+ int i, j;
+
+ be_ifg_foreach_neighbour(ifg, iter, irn, curr)
+ neighbours[i++] = curr;
+
+ for(i = 0; i < degree; ++i) {
+ for(j = 0; j < i; ++j)
+ if(!be_ifg_connected(ifg, neighbours[i], neighbours[j])) {
+ free(neighbours);
+ return 0;
+ }
+ }
+
+
+ free(neighbours);
+ return 1;
+}
+
+void be_ifg_check(const be_ifg_t *ifg)
+{
+ void *iter1 = be_ifg_nodes_iter_alloca(ifg);
+ void *iter2 = be_ifg_neighbours_iter_alloca(ifg);
+
+ ir_node *n, *m;
+
+ /* Check, if all neighbours are indeed connected to the node. */
+ be_ifg_foreach_node(ifg, iter1, n) {
+ be_ifg_foreach_neighbour(ifg, iter2, n, m)
+ if(!be_ifg_connected(ifg, n, m))
+ ir_fprintf(stderr, "%+F is a neighbour of %+F but they are not connected!\n", n, m);
+ }