Commit 6ffc63e1 by Richard Henderson Committed by Richard Henderson

dwarf2cfi: Allocate reg_saved_in_data in the heap.

        * dwarf2cfi.c (regs_saved_in_regs): Allocate from heap, not gc.
        Update all users to match.
        (execute_dwarf2_frame): Free reg_saved_in_data.

From-SVN: r176703
parent 999646c1
2011-07-23 Richard Henderson <rth@redhat.com> 2011-07-23 Richard Henderson <rth@redhat.com>
* dwarf2cfi.c (regs_saved_in_regs): Allocate from heap, not gc.
Update all users to match.
(execute_dwarf2_frame): Free reg_saved_in_data.
2011-07-23 Richard Henderson <rth@redhat.com>
* dwarf2cfi.c (queued_reg_save): Reorder for packing. Don't GTY. * dwarf2cfi.c (queued_reg_save): Reorder for packing. Don't GTY.
(queued_reg_saves): Don't GTY. Change to a VEC. (queued_reg_saves): Don't GTY. Change to a VEC.
(queue_reg_save): Update to match. (queue_reg_save): Update to match.
......
...@@ -1109,13 +1109,13 @@ typedef struct GTY(()) reg_saved_in_data { ...@@ -1109,13 +1109,13 @@ typedef struct GTY(()) reg_saved_in_data {
} reg_saved_in_data; } reg_saved_in_data;
DEF_VEC_O (reg_saved_in_data); DEF_VEC_O (reg_saved_in_data);
DEF_VEC_ALLOC_O (reg_saved_in_data, gc); DEF_VEC_ALLOC_O (reg_saved_in_data, heap);
/* A set of registers saved in other registers. This is implemented as /* A set of registers saved in other registers. This is implemented as
a flat array because it normally contains zero or 1 entry, depending a flat array because it normally contains zero or 1 entry, depending
on the target. IA-64 is the big spender here, using a maximum of on the target. IA-64 is the big spender here, using a maximum of
5 entries. */ 5 entries. */
static GTY(()) VEC(reg_saved_in_data, gc) *regs_saved_in_regs; static VEC(reg_saved_in_data, heap) *regs_saved_in_regs;
static GTY(()) reg_saved_in_data *cie_return_save; static GTY(()) reg_saved_in_data *cie_return_save;
...@@ -1161,7 +1161,7 @@ record_reg_saved_in_reg (rtx dest, rtx src) ...@@ -1161,7 +1161,7 @@ record_reg_saved_in_reg (rtx dest, rtx src)
if (dest == NULL) if (dest == NULL)
return; return;
elt = VEC_safe_push(reg_saved_in_data, gc, regs_saved_in_regs, NULL); elt = VEC_safe_push(reg_saved_in_data, heap, regs_saved_in_regs, NULL);
elt->orig_reg = src; elt->orig_reg = src;
elt->saved_in_reg = dest; elt->saved_in_reg = dest;
} }
...@@ -2699,6 +2699,9 @@ initial_return_save (rtx rtl) ...@@ -2699,6 +2699,9 @@ initial_return_save (rtx rtl)
static unsigned int static unsigned int
execute_dwarf2_frame (void) execute_dwarf2_frame (void)
{ {
gcc_checking_assert (queued_reg_saves == NULL);
gcc_checking_assert (regs_saved_in_regs == NULL);
/* The first time we're called, compute the incoming frame state. */ /* The first time we're called, compute the incoming frame state. */
if (cie_cfi_vec == NULL) if (cie_cfi_vec == NULL)
{ {
...@@ -2737,7 +2740,7 @@ execute_dwarf2_frame (void) ...@@ -2737,7 +2740,7 @@ execute_dwarf2_frame (void)
cie_return_save = ggc_alloc_reg_saved_in_data (); cie_return_save = ggc_alloc_reg_saved_in_data ();
*cie_return_save = *VEC_index (reg_saved_in_data, *cie_return_save = *VEC_index (reg_saved_in_data,
regs_saved_in_regs, 0); regs_saved_in_regs, 0);
regs_saved_in_regs = NULL; VEC_pop (reg_saved_in_data, regs_saved_in_regs);
break; break;
default: default:
gcc_unreachable (); gcc_unreachable ();
...@@ -2748,12 +2751,10 @@ execute_dwarf2_frame (void) ...@@ -2748,12 +2751,10 @@ execute_dwarf2_frame (void)
} }
/* Set up state for generating call frame debug info. */ /* Set up state for generating call frame debug info. */
gcc_checking_assert (queued_reg_saves == NULL);
gcc_checking_assert (regs_saved_in_regs == NULL);
cur_row = copy_cfi_row (cie_cfi_row); cur_row = copy_cfi_row (cie_cfi_row);
if (cie_return_save) if (cie_return_save)
VEC_safe_push (reg_saved_in_data, gc, regs_saved_in_regs, cie_return_save); VEC_safe_push (reg_saved_in_data, heap,
regs_saved_in_regs, cie_return_save);
cfa_store = cur_row->cfa; cfa_store = cur_row->cfa;
args_size = 0; args_size = 0;
...@@ -2770,7 +2771,7 @@ execute_dwarf2_frame (void) ...@@ -2770,7 +2771,7 @@ execute_dwarf2_frame (void)
/* Reset all function-specific information, particularly for GC. */ /* Reset all function-specific information, particularly for GC. */
XDELETEVEC (barrier_args_size); XDELETEVEC (barrier_args_size);
barrier_args_size = NULL; barrier_args_size = NULL;
regs_saved_in_regs = NULL; VEC_free (reg_saved_in_data, heap, regs_saved_in_regs);
VEC_free (queued_reg_save, heap, queued_reg_saves); VEC_free (queued_reg_save, heap, queued_reg_saves);
free_cfi_row (cur_row); free_cfi_row (cur_row);
......
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