typo fixed
[libfirm] / ir / be / benode.c
index b3dce78..dc215ac 100644 (file)
@@ -439,17 +439,18 @@ ir_node *be_new_Perm(const arch_register_class_t *cls, ir_graph *irg, ir_node *b
 
 void be_Perm_reduce(ir_node *perm, int new_size, int *map)
 {
-       ir_graph *irg           = get_irn_irg(perm);
-       int            arity    = get_irn_arity(perm);
-       be_reg_data_t *old_data = alloca(arity * sizeof(old_data[0]));
-       be_node_attr_t *attr    = get_irn_attr(perm);
-       ir_node **new_in        = NEW_ARR_D(ir_node *, irg->obst, new_size);
+       int            arity     = get_irn_arity(perm);
+       be_reg_data_t  *old_data = alloca(arity * sizeof(old_data[0]));
+       be_node_attr_t *attr     = get_irn_attr(perm);
+       ir_node        **new_in;
 
        int i;
 
        assert(be_is_Perm(perm));
        assert(new_size <= arity);
 
+       NEW_ARR_A(ir_node *, new_in, new_size);
+
        /* save the old register data */
        memcpy(old_data, attr->reg_data, arity * sizeof(old_data[0]));
 
@@ -699,7 +700,7 @@ ir_node *be_new_AddSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
        be_node_attr_t *a;
        ir_node *irn;
        ir_node *in[be_pos_AddSP_last];
-       const arch_register_class_t *class;
+       const arch_register_class_t *cls;
 
        in[be_pos_AddSP_old_sp] = old_sp;
        in[be_pos_AddSP_size]   = sz;
@@ -716,8 +717,8 @@ ir_node *be_new_AddSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
        be_set_constr_single_reg(irn, OUT_POS(pn_be_AddSP_sp), sp);
        a->reg_data[pn_be_AddSP_sp].reg = sp;
 
-       class = arch_register_get_class(sp);
-       be_node_set_reg_class(irn, OUT_POS(pn_be_AddSP_res), class);
+       cls = arch_register_get_class(sp);
+       be_node_set_reg_class(irn, OUT_POS(pn_be_AddSP_res), cls);
 
        return irn;
 }
@@ -984,7 +985,7 @@ void be_set_constr_limited(ir_node *node, int pos, const arch_register_req_t *re
        arch_register_req_t *r = get_req(node, pos);
 
        assert(arch_register_req_is(req, limited));
-       assert(! (req->type & (arch_register_req_type_should_be_same | arch_register_req_type_should_be_different)));
+       assert(!(req->type & (arch_register_req_type_should_be_same | arch_register_req_type_must_be_different)));
        memcpy(r, req, sizeof(r[0]));
        r->limited = rbitset_duplicate_obstack_alloc(obst, req->limited, req->cls->n_regs);
 }
@@ -1678,6 +1679,10 @@ static void copy_attr(const ir_node *old_node, ir_node *new_node)
 }
 
 static const ir_op_ops be_node_op_ops = {
+       firm_default_hash,
+       NULL,
+       NULL,
+       NULL,
        NULL,
        NULL,
        NULL,