summaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-23 20:27:32 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-23 20:27:32 +0000
commite53680b9cefa43dcaa508be4e7a6f73536c0490a (patch)
tree45d307c66bacd0b702a1a606d3d555dd7553d5f3 /gcc/dwarf2cfi.c
parentc73aa5685668b3b1249aab2bca1d6b03b18a491f (diff)
downloadgcc-e53680b9cefa43dcaa508be4e7a6f73536c0490a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index a800cb4880d..1d6413fb368 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -1109,13 +1109,13 @@ typedef struct GTY(()) reg_saved_in_data {
} 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 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
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;
@@ -1161,7 +1161,7 @@ record_reg_saved_in_reg (rtx dest, rtx src)
if (dest == NULL)
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->saved_in_reg = dest;
}
@@ -2699,6 +2699,9 @@ initial_return_save (rtx rtl)
static unsigned int
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. */
if (cie_cfi_vec == NULL)
{
@@ -2737,7 +2740,7 @@ execute_dwarf2_frame (void)
cie_return_save = ggc_alloc_reg_saved_in_data ();
*cie_return_save = *VEC_index (reg_saved_in_data,
regs_saved_in_regs, 0);
- regs_saved_in_regs = NULL;
+ VEC_pop (reg_saved_in_data, regs_saved_in_regs);
break;
default:
gcc_unreachable ();
@@ -2748,12 +2751,10 @@ execute_dwarf2_frame (void)
}
/* 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);
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;
args_size = 0;
@@ -2770,7 +2771,7 @@ execute_dwarf2_frame (void)
/* Reset all function-specific information, particularly for GC. */
XDELETEVEC (barrier_args_size);
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);
free_cfi_row (cur_row);