*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#ifdef WITH_ILP
+
#include "becopyilp_t.h"
#include "beifg_t.h"
size_red_t *new_size_red(copy_opt_t *co) {
- size_red_t *res = malloc(sizeof(*res));
+ size_red_t *res = xmalloc(sizeof(*res));
res->co = co;
res->all_removed = pset_new_ptr_default();
be_ifg_foreach_neighbour(ifg, iter, ifn, curr)
if (!sr_is_removed(sr, curr))
all[size++] = curr;
+ be_ifg_neighbours_break(ifg, iter);
/* check if these form a clique */
for (i=0; i<size; ++i)
int redo = 1;
int n_nodes = 0;
const be_ifg_t *ifg = sr->co->cenv->ifg;
- void *iter = be_ifg_neighbours_iter_alloca(ifg);
+ void *iter = be_ifg_nodes_iter_alloca(ifg);
while (redo) {
redo = 0;
}
}
}
+ be_ifg_nodes_break(ifg, iter);
}
}
if (!sr_is_removed(sr, other)) /* only inspect nodes which are in graph right now */
bitset_set(used_cols, get_irn_col(sr->co, other));
}
+ be_ifg_neighbours_break(ifg, iter);
/* now all bits not set are possible colors */
free_col = bitset_next_clear(used_cols, 0);
#include <stdio.h>
ilp_env_t *new_ilp_env(copy_opt_t *co, ilp_callback build, ilp_callback apply, void *env) {
- ilp_env_t *res = malloc(sizeof(*res));
+ ilp_env_t *res = xmalloc(sizeof(*res));
assert(res);
res->co = co;
free_lpp(ienv->lp);
free(ienv);
}
+
+#else /* WITH_ILP */
+
+static void only_that_you_can_compile_without_WITH_ILP_defined(void) {
+}
+
+#endif /* WITH_ILP */