diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-07 23:57:26 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-07 23:57:26 +0000 |
commit | 6033bf1158967debce9f2f2571d42586b4c97a67 (patch) | |
tree | ee3ca739383122468e3b5200d2fd5d7d6e90662c /gcc/dwarf2cfi.c | |
parent | c746c5c3e1d3ec6502d11fd9b82ac12ab62d2e4c (diff) | |
download | gcc-6033bf1158967debce9f2f2571d42586b4c97a67.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176018 138bc75d-0d04-0410-961f-82ee72b054a4
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 cd22e53fe3f..3e63299676c 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; |