summaryrefslogtreecommitdiffstats
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 00:05:57 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 00:05:57 +0000
commit32201e9aeb52a4eef9ba61c156399f0090a98023 (patch)
tree19aa53b591348882b9111f4982435cf750d2b3f5 /gcc/emit-rtl.c
parent8c4b1b28a0bc2a3a7a41d19a7b0780e3e3daa679 (diff)
downloadppe42-gcc-32201e9aeb52a4eef9ba61c156399f0090a98023.tar.gz
ppe42-gcc-32201e9aeb52a4eef9ba61c156399f0090a98023.zip
Revert:
2007-04-23 Jan Hubicka <jh@suse.cz> * function.c (init_function_start): Don't init line number info. (expand_function_end): Update. (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Kill. * function.h (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Remove prototypes. (struct function): Remove ib_boundaries_block. * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw): Use curr_insn_locator to initialize locator. (emit_line_note): Remove. * cfgexpand.c (expand_gimple_cond_expr): Update. (construct_exit_block): Likewise. (tree_expand_cfg): Initialize/finalize locators. * expr.c (expand_expr_real): Update. * cfglayout.c (line_locators_locs, line_locators_lines, file_locators_locs, file_locators_files): Remove. (set_block_levels): Move to cfgexpand.c. (insn_locators_initialize): Remove. (pass_insn_locators_initialize): Remove. (locations_locators_locs, locations_locators_vals): New static vars. (curr_location, last_location, curr_block, last_block, curr_rtl_loc): Likewise. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): New functions. (locator_location): New. (locator_line, locator_file): Rewrite. * rtl.h (emit_line_note): Kill. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): Declare. * tree-inline.c (initialize_cfun): Do not initialize ib_boundaries_block. * passes.c (pass_insn_locators_initialize): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124094 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c42
1 files changed, 39 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index e816026a3d4..16fa6c5ed7c 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3336,7 +3336,7 @@ make_insn_raw (rtx pattern)
INSN_CODE (insn) = -1;
LOG_LINKS (insn) = NULL;
REG_NOTES (insn) = NULL;
- INSN_LOCATOR (insn) = curr_insn_locator ();
+ INSN_LOCATOR (insn) = 0;
BLOCK_FOR_INSN (insn) = NULL;
#ifdef ENABLE_RTL_CHECKING
@@ -3369,7 +3369,7 @@ make_jump_insn_raw (rtx pattern)
LOG_LINKS (insn) = NULL;
REG_NOTES (insn) = NULL;
JUMP_LABEL (insn) = NULL;
- INSN_LOCATOR (insn) = curr_insn_locator ();
+ INSN_LOCATOR (insn) = 0;
BLOCK_FOR_INSN (insn) = NULL;
return insn;
@@ -3390,7 +3390,7 @@ make_call_insn_raw (rtx pattern)
LOG_LINKS (insn) = NULL;
REG_NOTES (insn) = NULL;
CALL_INSN_FUNCTION_USAGE (insn) = NULL;
- INSN_LOCATOR (insn) = curr_insn_locator ();
+ INSN_LOCATOR (insn) = 0;
BLOCK_FOR_INSN (insn) = NULL;
return insn;
@@ -4460,6 +4460,42 @@ emit_barrier (void)
return barrier;
}
+/* Make line numbering NOTE insn for LOCATION add it to the end
+ of the doubly-linked list, but only if line-numbers are desired for
+ debugging info and it doesn't match the previous one. */
+
+rtx
+emit_line_note (location_t location)
+{
+ rtx note;
+
+#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)
+ {
+ cur_insn_uid++;
+ 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;
+}
+
/* Emit a copy of note ORIG. */
rtx
OpenPOWER on IntegriCloud