diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-16 08:27:05 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-16 08:27:05 +0000 |
commit | fd3acbb3a2c176dc658f2b957c3693dfebb2ae7e (patch) | |
tree | 2b5cb543169ef70477d25bcc0683bd89eb4851a2 /gcc/emit-rtl.c | |
parent | 695a94b30aef2dbf9d30e96d02c8fdfa5d99c3eb (diff) | |
download | gcc-fd3acbb3a2c176dc658f2b957c3693dfebb2ae7e.zip gcc-fd3acbb3a2c176dc658f2b957c3693dfebb2ae7e.tar.gz gcc-fd3acbb3a2c176dc658f2b957c3693dfebb2ae7e.tar.bz2 |
function.h (struct emit_status): Remove x_last_linenum, x_last_filename.
* function.h (struct emit_status): Remove x_last_linenum,
x_last_filename. Add x_last_location.
* rtl.h: #include "input.h".
(NOTE_DATA): New.
* cfglayout.c (duplicate_insn_chain): Use emit_line_note for line
number notes.
* emit-rtl.c (last_linenum, last_filename): Remove.
(last_location): New.
(emit_line_note_after): LINE must always be >= 0.
(emit_line_note): Likewise. Check not duplicate here...
(emit_note): ... rather than here.
(emit_line_note_force, force_next_line_note, init_emit): Adjust.
* integrate.c (expand_inline_function): Use emit_line_note for
line number notes.
(copy_insn_list): Likewise.
* unroll.c (copy_loop_body): Likewise.
* Makefile.in (RTL_H): Add input.h.
From-SVN: r68002
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 4590bf2..03ee900 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -170,8 +170,7 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def))) #define first_insn (cfun->emit->x_first_insn) #define last_insn (cfun->emit->x_last_insn) #define cur_insn_uid (cfun->emit->x_cur_insn_uid) -#define last_linenum (cfun->emit->x_last_linenum) -#define last_filename (cfun->emit->x_last_filename) +#define last_location (cfun->emit->x_last_location) #define first_label_num (cfun->emit->x_first_label_num) static rtx make_jump_insn_raw PARAMS ((rtx)); @@ -4636,7 +4635,9 @@ emit_line_note_after (file, line, after) { rtx note; - if (no_line_numbers && line > 0) + if (line < 0) + abort (); + if (no_line_numbers) { cur_insn_uid++; return 0; @@ -4896,12 +4897,22 @@ emit_line_note (file, line) const char *file; int line; { + if (line < 0) + abort (); + set_file_and_line_for_stmt (file, line); -#if 0 + if (file && last_location.file && !strcmp (file, last_location.file) + && line == last_location.line) + return NULL_RTX; + last_location.file = file; + last_location.line = line; + if (no_line_numbers) - return 0; -#endif + { + cur_insn_uid++; + return NULL_RTX; + } return emit_note (file, line); } @@ -4918,21 +4929,6 @@ emit_note (file, line) { rtx note; - if (line > 0) - { - if (file && last_filename && !strcmp (file, last_filename) - && line == last_linenum) - return 0; - last_filename = file; - last_linenum = line; - } - - if (no_line_numbers && line > 0) - { - cur_insn_uid++; - return 0; - } - note = rtx_alloc (NOTE); INSN_UID (note) = cur_insn_uid++; NOTE_SOURCE_FILE (note) = file; @@ -4949,7 +4945,7 @@ emit_line_note_force (file, line) const char *file; int line; { - last_linenum = -1; + last_location.line = -1; return emit_line_note (file, line); } @@ -4959,7 +4955,7 @@ emit_line_note_force (file, line) void force_next_line_note () { - last_linenum = -1; + last_location.line = -1; } /* Place a note of KIND on insn INSN with DATUM as the datum. If a @@ -5438,8 +5434,8 @@ init_emit () seq_rtl_expr = NULL; cur_insn_uid = 1; reg_rtx_no = LAST_VIRTUAL_REGISTER + 1; - last_linenum = 0; - last_filename = 0; + last_location.line = 0; + last_location.file = 0; first_label_num = label_num; last_label_num = 0; seq_stack = NULL; |