aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-07-07 23:42:41 +0000
committerRichard Henderson <rth@gcc.gnu.org>2011-07-07 16:42:41 -0700
commitbc5612ed5640eb8e98e9f50061db7d2325113eef (patch)
treeb847cd3bf525fe133a6b119fd23ec62761a5bce8 /gcc/dwarf2out.c
parent647a156710dcd42a2bccce3fcc0322f2be835cae (diff)
downloadgcc-bc5612ed5640eb8e98e9f50061db7d2325113eef.zip
gcc-bc5612ed5640eb8e98e9f50061db7d2325113eef.tar.gz
gcc-bc5612ed5640eb8e98e9f50061db7d2325113eef.tar.bz2
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 <rth@redhat.com> From-SVN: r176016
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0f6918d..78e1b1a 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -843,7 +843,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
/* Similar, but do it via assembler directives instead. */
-void
+static void
output_cfi_directive (dw_cfi_ref cfi)
{
unsigned long r, r2;
@@ -942,6 +942,12 @@ output_cfi_directive (dw_cfi_ref cfi)
}
}
+void
+dwarf2out_emit_cfi (dw_cfi_ref cfi)
+{
+ output_cfi_directive (cfi);
+}
+
/* Output CFIs from VEC, up to index UPTO, to bring current FDE to the
same state as after executing CFIs in CFI chain. DO_CFI_ASM is
true if .cfi_* directives shall be emitted, false otherwise. If it