diff options
author | Richard Henderson <rth@redhat.com> | 2011-07-07 16:57:26 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-07-07 16:57:26 -0700 |
commit | a518b99616d4d007e289654332c934e7c3ec8d52 (patch) | |
tree | ee3ca739383122468e3b5200d2fd5d7d6e90662c /gcc/dwarf2cfi.c | |
parent | 89e25f958415ae1ae019e8f35398624b95c44f61 (diff) | |
download | gcc-a518b99616d4d007e289654332c934e7c3ec8d52.zip gcc-a518b99616d4d007e289654332c934e7c3ec8d52.tar.gz gcc-a518b99616d4d007e289654332c934e7c3ec8d52.tar.bz2 |
dwarf2out: Convert fde_table to a VEC.
Prepare for allocating the FDE for the current function earlier
than dwarf2out_begin_prologue.
* dwarf2out.c (fde_table, fde_table_allocated, fde_table_in_use,
FDE_TABLE_INCREMENT): Replace with...
(fde_vec): ... this, a new vector.
(current_fde): Remove. Replace all users with cfun->fde.
(output_call_frame_info): Use FOR_EACH_VEC_ELT over fde_vec.
(size_of_aranges, dwarf2out_finish): Likewise.
(dwarf2out_alloc_current_fde): Break out from ...
(dwarf2out_begin_prologue): ... here.
(dwarf2out_frame_init): Remove.
* dwarf2cfi.c: Update all users of current_fde.
(dwarf2out_frame_init): Rename from dwarf2cfi_frame_init.
* dwarf2out.h: Update decls.
(dw_fde_node): Add fde_index member.
* function.h (struct function): Add fde member.
From-SVN: r176018
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r-- | gcc/dwarf2cfi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index cd22e53..3e63299 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -294,7 +294,7 @@ add_fde_cfi (dw_cfi_ref cfi) } else { - dw_fde_ref fde = current_fde (); + dw_fde_ref fde = cfun->fde; VEC_safe_push (dw_cfi_ref, gc, fde->dw_fde_cfi, cfi); dwarf2out_emit_cfi (cfi); } @@ -468,7 +468,7 @@ lookup_cfa (dw_cfa_location *loc) FOR_EACH_VEC_ELT (dw_cfi_ref, cie_cfi_vec, ix, cfi) lookup_cfa_1 (cfi, loc, &remember); - fde = current_fde (); + fde = cfun->fde; if (fde) FOR_EACH_VEC_ELT (dw_cfi_ref, fde->dw_fde_cfi, ix, cfi) lookup_cfa_1 (cfi, loc, &remember); @@ -599,8 +599,8 @@ static void reg_save (bool for_cie, unsigned int reg, unsigned int sreg, HOST_WIDE_INT offset) { + dw_fde_ref fde = for_cie ? NULL : cfun->fde; dw_cfi_ref cfi = new_cfi (); - dw_fde_ref fde = current_fde (); cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg; @@ -1652,7 +1652,7 @@ dwarf2out_frame_debug_cfa_window_save (void) Rule 16: (set sp (and: sp <const_int>)) constraints: cfa_store.reg == sp - effects: current_fde.stack_realign = 1 + effects: cfun->fde.stack_realign = 1 cfa_store.offset = 0 fde->drap_reg = cfa.reg if cfa.reg != sp and cfa.reg != fp @@ -1742,7 +1742,7 @@ dwarf2out_frame_debug_expr (rtx expr) src = rsi; } - fde = current_fde (); + fde = cfun->fde; switch (GET_CODE (dest)) { @@ -2268,7 +2268,7 @@ dwarf2out_frame_debug (rtx insn, bool after_p) n = XEXP (note, 0); if (REG_P (n)) { - dw_fde_ref fde = current_fde (); + dw_fde_ref fde = cfun->fde; if (fde) { gcc_assert (fde->vdrap_reg == INVALID_REGNUM); @@ -2387,7 +2387,7 @@ cfi_label_required_p (dw_cfi_ref cfi) static void add_cfis_to_fde (void) { - dw_fde_ref fde = current_fde (); + dw_fde_ref fde = cfun->fde; rtx insn, next; /* We always start with a function_begin label. */ bool first = false; @@ -2611,7 +2611,7 @@ dwarf2cfi_function_init (void) /* Run once. */ void -dwarf2cfi_frame_init (void) +dwarf2out_frame_init (void) { dw_cfa_location loc; |