aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-07-07 17:05:57 -0700
committerRichard Henderson <rth@gcc.gnu.org>2011-07-07 17:05:57 -0700
commit7644b3c7f08daeec085f4dc2ba180dab5bc29d28 (patch)
tree423b5bc61bca007f2d488d591b3421ca41386eaf /gcc/dwarf2out.c
parenta518b99616d4d007e289654332c934e7c3ec8d52 (diff)
downloadgcc-7644b3c7f08daeec085f4dc2ba180dab5bc29d28.zip
gcc-7644b3c7f08daeec085f4dc2ba180dab5bc29d28.tar.gz
gcc-7644b3c7f08daeec085f4dc2ba180dab5bc29d28.tar.bz2
dwarf2: Extract cfi creation to a new pass.
* tree-pass.h (pass_dwarf2_frame): Declare. * passes.c (init_optimization_passes): Add it. * dwarf2cfi.c (dwarf2out_frame_debug): Make static. (create_cfi_notes): Rename from dwarf2out_frame_debug_after_prologue; make static, do not call add_cfis_to_fde. (dwarf2out_frame_debug_init, dwarf2cfi_function_init, dwarf2out_frame_init): Merge into... (execute_dwarf2_frame): ... here. New function. (dwarf2out_do_frame, dwarf2out_do_cfi_asm): Make boolean. Change saved_do_cfi_asm to a tri-state variable. (gate_dwarf2_frame, pass_dwarf2_frame): New. * dwarf2out.c (dwarf2out_begin_prologue): Only allocate the fde if it has yet to be done. Don't call dwarf2cfi_function_init. * dwarf2out.h, debug.h: Update decls. * final.c (final_start_function): Don't call dwarf2out_frame_debug_init or dwarf2out_frame_debug_after_prologue. * lto-streamer-in.c (lto_init_eh): Don't call dwarf2out_frame_init. * toplev.c (lang_dependent_init): Likewise. From-SVN: r176019
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 51ec613..337650d 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -1605,15 +1605,20 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
if (!do_frame)
return;
+ /* Cater to the various TARGET_ASM_OUTPUT_MI_THUNK implementations that
+ emit insns as rtx but bypass the bulk of rest_of_compilation, which
+ would include pass_dwarf2_frame. If we've not created the FDE yet,
+ do so now. */
+ fde = cfun->fde;
+ if (fde == NULL)
+ fde = dwarf2out_alloc_current_fde ();
+
/* Initialize the bits of CURRENT_FDE that were not available earlier. */
- fde = dwarf2out_alloc_current_fde ();
fde->dw_fde_begin = dup_label;
fde->dw_fde_current_label = dup_label;
fde->in_std_section = (fnsec == text_section
|| (cold_text_section && fnsec == cold_text_section));
- dwarf2cfi_function_init ();
-
/* We only want to output line number information for the genuine dwarf2
prologue case, not the eh frame case. */
#ifdef DWARF2_DEBUGGING_INFO