static void build_affinity_cstr(ilp_env_t *ienv)
{
unsigned n_colors = arch_register_class_n_regs(ienv->co->cls);
static void build_affinity_cstr(ilp_env_t *ienv)
{
unsigned n_colors = arch_register_class_n_regs(ienv->co->cls);
/* for all optimization units */
list_for_each_entry(unit_t, curr, &ienv->co->units, units) {
/* for all optimization units */
list_for_each_entry(unit_t, curr, &ienv->co->units, units) {
- return (edge_t*)set_insert(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ return set_insert(edge_t, edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
- return (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ return set_find(edge_t, edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
}
static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *counter)
}
static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *counter)
- e = (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ e = set_find(edge_t, edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
/* for each node with affinity edges */
co_gs_foreach_aff_node(ienv->co, aff) {
struct obstack ob;
/* for each node with affinity edges */
co_gs_foreach_aff_node(ienv->co, aff) {
struct obstack ob;
/* search for a candidate to extend the clique */
for (i=0; i<n_nodes; ++i) {
ir_node *cand = nodes[i];
/* search for a candidate to extend the clique */
for (i=0; i<n_nodes; ++i) {
ir_node *cand = nodes[i];
cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, pset_count(clique)-1);
cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, pset_count(clique)-1);
/* do not walk backwards or in circles */
if (pdeq_contains(path, irn))
/* do not walk backwards or in circles */
if (pdeq_contains(path, irn))
/* for each node with affinity edges */
co_gs_foreach_aff_node(ienv->co, aff_info) {
pdeq *path = new_pdeq();
/* for each node with affinity edges */
co_gs_foreach_aff_node(ienv->co, aff_info) {
pdeq *path = new_pdeq();