From 6773e15fa5ac64bf67b19088e149f4d3cda2cf9a Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 30 Jun 2004 11:18:01 -0700 Subject: Conditionally compile support for --enable-mapped_location. * cfgexpand.c: Handle USE_MAPPED_LOCATION case for function_end_locus. * cfglayout.c (insn_locators_initialize): Const cleanup. New macros. * cfgrtl.c (delete_insn): Use new NOTE_DELETED_LABEL_NAME macro. * print-rtl.c (print_rtx): Likewise. * emit-rtl.c: Don't clear NOTE_SOURCE_FILE if USE_MAPPED_LOCATION. * combine.c: Use new SET_INSN_DELETED macro. * flow.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * recog.c: Likewise. * reload1.c: Likewise. * diagnostic.c: Use expand_location macro. * pretty-print.c (pp_base_format_text): Likewise. * profile.c: Likewise. * dwarf2out.c: Likewise. Also use expand_location, DECL_IS_BUILTIN. * dwarf2out.c (dwarf2out_decl: Use BUILTINS_LOCATION. * emit-rtl.c (emit_line_note): Simplify if USE_MAPPED_LOCATION. (force_next_line_note, insn_emit): Handle USE_MAPPED_LOCATION case. * final.c (final): Likewise. * haifa-sched.c: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * rtl-error.c: Likewise. * stmt.c (check_seenlabel): Likewise. * tree-pretty-print.c: Likewise. From-SVN: r83921 --- gcc/haifa-sched.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'gcc/haifa-sched.c') diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index e3c819c3ea5..122f9714813 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1559,8 +1559,13 @@ restore_line_notes (rtx head, rtx tail) && (note = LINE_NOTE (insn)) != 0 && note != line && (line == 0 +#ifdef USE_MAPPED_LOCATION + || NOTE_SOURCE_LOCATION (note) != NOTE_SOURCE_LOCATION (line) +#else || NOTE_LINE_NUMBER (note) != NOTE_LINE_NUMBER (line) - || NOTE_SOURCE_FILE (note) != NOTE_SOURCE_FILE (line))) + || NOTE_SOURCE_FILE (note) != NOTE_SOURCE_FILE (line) +#endif + )) { line = note; prev = PREV_INSN (insn); @@ -1577,7 +1582,9 @@ restore_line_notes (rtx head, rtx tail) { added_notes++; new = emit_note_after (NOTE_LINE_NUMBER (note), prev); +#ifndef USE_MAPPED_LOCATION NOTE_SOURCE_FILE (new) = NOTE_SOURCE_FILE (note); +#endif } } if (sched_verbose && added_notes) @@ -1605,17 +1612,20 @@ rm_redundant_line_notes (void) if (active_insn == 0) { notes++; - NOTE_SOURCE_FILE (insn) = 0; - NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; + SET_INSN_DELETED (insn); } /* If the line number is unchanged, LINE is redundant. */ else if (line +#ifdef USE_MAPPED_LOCATION + && NOTE_SOURCE_LOCATION (line) == NOTE_SOURCE_LOCATION (insn) +#else && NOTE_LINE_NUMBER (line) == NOTE_LINE_NUMBER (insn) - && NOTE_SOURCE_FILE (line) == NOTE_SOURCE_FILE (insn)) + && NOTE_SOURCE_FILE (line) == NOTE_SOURCE_FILE (insn) +#endif +) { notes++; - NOTE_SOURCE_FILE (line) = 0; - NOTE_LINE_NUMBER (line) = NOTE_INSN_DELETED; + SET_INSN_DELETED (line); line = insn; } else -- cgit v1.2.1