removed unitialized used vartiable
[libfirm] / ir / be / becopyopt.c
index 07ff224..480b416 100644 (file)
@@ -8,13 +8,6 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
 #include "execfreq.h"
 #include "xmalloc.h"
 #include "debug.h"
@@ -464,7 +457,8 @@ static void co_collect_units(ir_node *irn, void *env) {
                /* Src == Tgt of a 2-addr-code instruction */
                if (is_2addr_code(req)) {
                        ir_node *other = get_irn_n(irn, req->other_same);
-                       if (!nodes_interfere(co->cenv, irn, other)) {
+                       if (!arch_irn_is(co->aenv, other, ignore) &&
+                                       !nodes_interfere(co->cenv, irn, other)) {
                                unit->nodes = xmalloc(2 * sizeof(*unit->nodes));
                                unit->costs = xmalloc(2 * sizeof(*unit->costs));
                                unit->node_count = 2;
@@ -784,7 +778,8 @@ static void build_graph_walker(ir_node *irn, void *env) {
                        arch_get_register_req(co->aenv, irn, -1);
                if (is_2addr_code(req)) {
                        ir_node *other = get_irn_n(irn, req->other_same);
-                       add_edges(co, irn, other, co->get_costs(co, irn, other, 0));
+                       if(!arch_irn_is(co->aenv, other, ignore))
+                               add_edges(co, irn, other, co->get_costs(co, irn, other, 0));
                }
        }
 }
@@ -891,7 +886,7 @@ void co_dump_appel_graph(const copy_opt_t *co, FILE *f)
 }
 
 typedef struct _appel_clique_walker_t {
-       phase_t ph;
+       ir_phase ph;
        const copy_opt_t *co;
        int curr_nr;
        int node_count;
@@ -929,7 +924,7 @@ static int appel_aff_weight(const appel_clique_walker_t *env, ir_node *bl)
 #endif
 }
 
-static void *appel_clique_walker_irn_init(phase_t *phase, ir_node *irn, void *old)
+static void *appel_clique_walker_irn_init(ir_phase *phase, ir_node *irn, void *old)
 {
        appel_block_info_t *res = NULL;