Commit 83cbe7e4 by Richard Henderson Committed by Jeff Law

local-alloc.c (local_alloc): Use malloc not alloca for reg_qty, reg_offset, ref_next_in_qty.

(
        * local-alloc.c (local_alloc): Use malloc not alloca for
        reg_qty, reg_offset, ref_next_in_qty.

From-SVN: r23783
parent 578db09b
...@@ -337,9 +337,9 @@ local_alloc () ...@@ -337,9 +337,9 @@ local_alloc ()
qty_n_refs = (int *) alloca (max_qty * sizeof (int)); qty_n_refs = (int *) alloca (max_qty * sizeof (int));
qty_changes_size = (char *) alloca (max_qty * sizeof (char)); qty_changes_size = (char *) alloca (max_qty * sizeof (char));
reg_qty = (int *) alloca (max_regno * sizeof (int)); reg_qty = (int *) xmalloc (max_regno * sizeof (int));
reg_offset = (char *) alloca (max_regno * sizeof (char)); reg_offset = (char *) xmalloc (max_regno * sizeof (char));
reg_next_in_qty = (int *) alloca (max_regno * sizeof (int)); reg_next_in_qty = (int *) xmalloc(max_regno * sizeof (int));
/* Allocate the reg_renumber array */ /* Allocate the reg_renumber array */
allocate_reg_info (max_regno, FALSE, TRUE); allocate_reg_info (max_regno, FALSE, TRUE);
...@@ -406,6 +406,10 @@ local_alloc () ...@@ -406,6 +406,10 @@ local_alloc ()
alloca (0); alloca (0);
#endif #endif
} }
free (reg_qty);
free (reg_offset);
free (reg_next_in_qty);
} }
/* Depth of loops we are in while in update_equiv_regs. */ /* Depth of loops we are in while in update_equiv_regs. */
......
Markdown is supported
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