bearch: Use arch_register_req_is(req, ignore) instead of arch_irn_is_ignore(...)...
[libfirm] / ir / ir / irop.c
index ba3e476..c1001c8 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <string.h>
 
+#include "error.h"
 #include "irop_t.h"
 #include "irnode_t.h"
 #include "irhooks.h"
@@ -112,8 +113,11 @@ void ir_clear_opcodes_generic_func(void)
 
        for (i = 0; i < n; ++i) {
                ir_op *op = ir_get_opcode(i);
-               if (op != NULL)
-                       op->ops.generic = (op_func)NULL;
+               if (op == NULL)
+                       continue;
+               op->ops.generic  = (op_func)NULL;
+               op->ops.generic1 = (op_func)NULL;
+               op->ops.generic2 = (op_func)NULL;
        }
 }
 
@@ -335,7 +339,7 @@ static int node_cmp_attr_Phi(const ir_node *a, const ir_node *b)
        (void) b;
        /* do not CSE Phi-nodes without any inputs when building new graphs */
        if (get_irn_arity(a) == 0 &&
-           get_irg_phase_state(get_irn_irg(a)) == phase_building) {
+               irg_is_constrained(get_irn_irg(a), IR_GRAPH_CONSTRAINT_CONSTRUCTION)) {
            return 1;
        }
        return 0;
@@ -498,16 +502,10 @@ static int node_cmp_attr_InstOf(const ir_node *a, const ir_node *b)
 static void default_copy_attr(ir_graph *irg, const ir_node *old_node,
                               ir_node *new_node)
 {
-       unsigned size = firm_add_node_size;
        (void) irg;
 
        assert(get_irn_op(old_node) == get_irn_op(new_node));
        memcpy(&new_node->attr, &old_node->attr, get_op_attr_size(get_irn_op(old_node)));
-
-       if (size > 0) {
-               /* copy additional node data */
-               memcpy(get_irn_data(new_node, void, size), get_irn_data(old_node, void, size), size);
-       }
 }
 
 /**