Commit 93783832 authored by Michael Beck's avatar Michael Beck
Browse files

be_Perm_reduce: no need to allocate a temporary array on the irg's obstack,...

be_Perm_reduce: no need to allocate a temporary array on the irg's obstack, set_in_in() creates a new one

[r21310]
parent 02b3afb7
......@@ -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]));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment