summaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-07 23:42:41 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-07 23:42:41 +0000
commit46346a5290f78911b8ae50503d700d0a6e3db9c8 (patch)
treeb847cd3bf525fe133a6b119fd23ec62761a5bce8 /gcc/rtl.h
parentdcdf448e3aa4f64d0ed7210c00c35eab34f7c404 (diff)
downloadgcc-46346a5290f78911b8ae50503d700d0a6e3db9c8.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176016 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 5e009c0b871..e3ceecddc2f 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -180,6 +180,7 @@ union rtunion_def
mem_attrs *rt_mem;
reg_attrs *rt_reg;
struct constant_descriptor_rtx *rt_constant;
+ struct dw_cfi_struct *rt_cfi;
};
typedef union rtunion_def rtunion;
@@ -708,6 +709,7 @@ extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
#define XTREE(RTX, N) (RTL_CHECK1 (RTX, N, 't').rt_tree)
#define XBBDEF(RTX, N) (RTL_CHECK1 (RTX, N, 'B').rt_bb)
#define XTMPL(RTX, N) (RTL_CHECK1 (RTX, N, 'T').rt_str)
+#define XCFI(RTX, N) (RTL_CHECK1 (RTX, N, 'C').rt_cfi)
#define XVECEXP(RTX, N, M) RTVEC_ELT (XVEC (RTX, N), M)
#define XVECLEN(RTX, N) GET_NUM_ELEM (XVEC (RTX, N))
@@ -740,6 +742,7 @@ extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
#define XCMODE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_type)
#define XCTREE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_tree)
#define XCBBDEF(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bb)
+#define XCCFI(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cfi)
#define XCCSELIB(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cselib)
#define XCVECEXP(RTX, N, M, C) RTVEC_ELT (XCVEC (RTX, N, C), M)
@@ -883,6 +886,8 @@ extern const char * const reg_note_name[];
#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 4, NOTE)
+#define NOTE_CFI(INSN) XCCFI (INSN, 4, NOTE)
+#define NOTE_LABEL_NUMBER(INSN) XCINT (INSN, 4, NOTE)
/* In a NOTE that is a line number, this is the line number.
Other kinds of NOTEs are identified by negative numbers here. */