we save entities not idents in ia32 symconsts now
[libfirm] / ir / be / becopyopt.c
index 07ff224..2de1592 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));
                }
        }
 }