From bc5612ed5640eb8e98e9f50061db7d2325113eef Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 7 Jul 2011 23:42:41 +0000 Subject: dwarf2out: Move insn scanning out of final.c. This patch is essentially Bernd's 005-scanfirst patch, updated for the introduction of the dwarf2cfi.c file. We introduce NOTE_INSN_CFI and NOTE_INSN_CFI_LABEL to hold the dwarf2 info during the bulk of final. The actual construction of these notes still happens during final, right at the very beginning of the pass, via the dwarf2out_frame_debug_init hook. * dwarf2cfi.c (cfi_insn): New. (dwarf2out_cfi_label): Don't emit cfi label here. (add_fde_cfi): Create a NOTE_INSN_CFI. (dwarf2out_frame_debug): Setup cfi_insn. (dwarf2out_frame_debug_init): Loop over insns creating CFI notes. (dwarf2out_cfi_begin_epilogue): Make static. (dwarf2out_frame_debug_restore_state): Make static. * dwarf2out.c (output_cfi_directive): Make static. (dwarf2out_emit_cfi): New. * dwarf2out.h: Update. * final.c (final): Remove CFI notes. (final_scan_insn): Don't call dwarf2out_cfi_begin_epilogue, dwarf2out_frame_debug_restore_state, dwarf2out_frame_debug. Handle NOTE_INSN_CFI and NOTE_INSN_CFI_LABEL. * insn-notes.def (NOTE_INSN_CFI): New. (NOTE_INSN_CFI_LABEL): New. * rtl.h (union rtunion_def): Add rt_cfi member. (XCFI, XCCFI, NOTE_CFI, NOTE_LABEL_NUMBER): New. Co-Authored-By: Richard Henderson From-SVN: r176016 --- gcc/dwarf2out.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/dwarf2out.h') diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h index 40cd848..9342d50 100644 --- a/gcc/dwarf2out.h +++ b/gcc/dwarf2out.h @@ -216,7 +216,6 @@ dw_loc_descr_node; /* Interface from dwarf2out.c to dwarf2cfi.c. */ extern dw_fde_ref current_fde (void); -extern void output_cfi_directive (dw_cfi_ref); extern struct dw_loc_descr_struct *build_cfa_loc (dw_cfa_location *, HOST_WIDE_INT); extern struct dw_loc_descr_struct *build_cfa_aligned_loc @@ -244,8 +243,7 @@ extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc extern void dwarf2out_decl (tree); extern void dwarf2out_frame_debug (rtx, bool); extern void dwarf2out_frame_debug_init (void); -extern void dwarf2out_cfi_begin_epilogue (rtx); -extern void dwarf2out_frame_debug_restore_state (void); +extern void dwarf2out_emit_cfi (dw_cfi_ref cfi); extern void debug_dwarf (void); struct die_struct; -- cgit v1.1