summaryrefslogtreecommitdiffstats
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-30 18:18:01 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-30 18:18:01 +0000
commit7bd3dcc4338f994821b15d15b47f76779c6b323c (patch)
treef55d68b85e9f94ddf4bbe5761ff0a2f4ee16bbc9 /gcc/emit-rtl.c
parent2ed8b5d0fb02aeec25a8ff7cd1e48f2fafbf45f3 (diff)
downloadppe42-gcc-7bd3dcc4338f994821b15d15b47f76779c6b323c.tar.gz
ppe42-gcc-7bd3dcc4338f994821b15d15b47f76779c6b323c.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 91ef8e9fafd..c4235bf3fd1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -4131,7 +4131,9 @@ emit_note_before (int subtype, rtx before)
{
rtx note = rtx_alloc (NOTE);
INSN_UID (note) = cur_insn_uid++;
+#ifndef USE_MAPPED_LOCATION
NOTE_SOURCE_FILE (note) = 0;
+#endif
NOTE_LINE_NUMBER (note) = subtype;
BLOCK_FOR_INSN (note) = NULL;
@@ -4354,7 +4356,9 @@ emit_note_after (int subtype, rtx after)
{
rtx note = rtx_alloc (NOTE);
INSN_UID (note) = cur_insn_uid++;
+#ifndef USE_MAPPED_LOCATION
NOTE_SOURCE_FILE (note) = 0;
+#endif
NOTE_LINE_NUMBER (note) = subtype;
BLOCK_FOR_INSN (note) = NULL;
add_insn_after (note, after);
@@ -4629,10 +4633,15 @@ emit_line_note (location_t location)
set_file_and_line_for_stmt (location);
+#ifdef USE_MAPPED_LOCATION
+ if (location == last_location)
+ return NULL_RTX;
+#else
if (location.file && last_location.file
&& !strcmp (location.file, last_location.file)
&& location.line == last_location.line)
return NULL_RTX;
+#endif
last_location = location;
if (no_line_numbers)
@@ -4641,8 +4650,12 @@ emit_line_note (location_t location)
return NULL_RTX;
}
+#ifdef USE_MAPPED_LOCATION
+ note = emit_note ((int) location);
+#else
note = emit_note (location.line);
NOTE_SOURCE_FILE (note) = location.file;
+#endif
return note;
}
@@ -4694,7 +4707,11 @@ emit_note (int note_no)
void
force_next_line_note (void)
{
+#ifdef USE_MAPPED_LOCATION
+ last_location = -1;
+#else
last_location.line = -1;
+#endif
}
/* Place a note of KIND on insn INSN with DATUM as the datum. If a
@@ -5154,8 +5171,7 @@ init_emit (void)
seq_rtl_expr = NULL;
cur_insn_uid = 1;
reg_rtx_no = LAST_VIRTUAL_REGISTER + 1;
- last_location.line = 0;
- last_location.file = 0;
+ last_location = UNKNOWN_LOCATION;
first_label_num = label_num;
last_label_num = 0;
seq_stack = NULL;
OpenPOWER on IntegriCloud