and again
[libfirm] / ir / be / beifg.c
index 0914d60..1827de1 100644 (file)
@@ -184,7 +184,7 @@ 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 **neighbours = XMALLOCN(ir_node*, degree);
 
        ir_node *curr;
        int i, j;
@@ -276,7 +276,7 @@ void be_ifg_check_sorted(const be_ifg_t *ifg)
        const int node_count = be_ifg_check_get_node_count(ifg);
        int i = 0;
 
-       ir_node **all_nodes = xmalloc(node_count * sizeof(all_nodes[0]));
+       ir_node **all_nodes = XMALLOCN(ir_node*, node_count);
 
        be_ifg_foreach_node(ifg, iter1, n)
        {
@@ -294,7 +294,7 @@ void be_ifg_check_sorted(const be_ifg_t *ifg)
 
        for (i = 0; i < node_count; i++)
        {
-               ir_node **neighbours = xmalloc(node_count * sizeof(neighbours[0]));
+               ir_node **neighbours = XMALLOCN(ir_node*, node_count);
                int j = 0;
                int k = 0;
                int degree = 0;
@@ -334,7 +334,7 @@ void be_ifg_check_sorted_to_file(const be_ifg_t *ifg, FILE *f)
        const int node_count = be_ifg_check_get_node_count(ifg);
        int i = 0;
 
-       ir_node **all_nodes = xmalloc(node_count * sizeof(all_nodes[0]));
+       ir_node **all_nodes = XMALLOCN(ir_node*, node_count);
 
        be_ifg_foreach_node(ifg, iter1, n)
        {
@@ -352,7 +352,7 @@ void be_ifg_check_sorted_to_file(const be_ifg_t *ifg, FILE *f)
 
        for (i = 0; i < node_count; i++)
        {
-               ir_node **neighbours = xmalloc(node_count * sizeof(neighbours[0]));
+               ir_node **neighbours = XMALLOCN(ir_node*, node_count);
                int j = 0;
                int k = 0;
                int degree = 0;
@@ -400,7 +400,7 @@ void be_ifg_check_performance(be_chordal_env_t *chordal_env)
 
        if (get_irg_estimated_node_cnt(chordal_env->irg) >= BE_CH_PERFORMANCETEST_MIN_NODES)
        {
-               coloring_init(&coloring, chordal_env->irg, &chordal_env->birg->main_env->arch_env);
+               coloring_init(&coloring, chordal_env->irg, chordal_env->birg->main_env->arch_env);
                coloring_save(&coloring);
 
                ir_timer_reset(timer);
@@ -646,7 +646,7 @@ static void int_comp_rec(be_irg_t *birg, be_ifg_t *ifg, ir_node *n, bitset_t *se
        ir_node *m;
 
        be_ifg_foreach_neighbour(ifg, neigh_it, n, m) {
-               if(!bitset_contains_irn(seen, m) && !arch_irn_is(&birg->main_env->arch_env, m, ignore)) {
+               if(!bitset_contains_irn(seen, m) && !arch_irn_is(birg->main_env->arch_env, m, ignore)) {
                        bitset_add_irn(seen, m);
                        int_comp_rec(birg, ifg, m, seen);
                }
@@ -663,7 +663,7 @@ static int int_component_stat(be_irg_t *birg, be_ifg_t *ifg)
        ir_node *n;
 
        be_ifg_foreach_node(ifg, nodes_it, n) {
-               if (! bitset_contains_irn(seen, n) && ! arch_irn_is(&birg->main_env->arch_env, n, ignore)) {
+               if (! bitset_contains_irn(seen, n) && ! arch_irn_is(birg->main_env->arch_env, n, ignore)) {
                        ++n_comp;
                        bitset_add_irn(seen, n);
                        int_comp_rec(birg, ifg, n, seen);