aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog35
-rw-r--r--gcc/cfgcleanup.c2
-rw-r--r--gcc/cfgrtl.c11
-rw-r--r--gcc/cse.c13
-rw-r--r--gcc/emit-rtl.c61
-rw-r--r--gcc/function.c88
-rw-r--r--gcc/haifa-sched.c141
-rw-r--r--gcc/jump.c56
-rw-r--r--gcc/modulo-sched.c49
-rw-r--r--gcc/passes.c1
-rw-r--r--gcc/regmove.c10
-rw-r--r--gcc/rtl.h2
-rw-r--r--gcc/sched-ebb.c4
-rw-r--r--gcc/sched-int.h2
-rw-r--r--gcc/sched-rgn.c5
-rw-r--r--gcc/tree-pass.h1
16 files changed, 47 insertions, 434 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 653de70..7ddbac9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,38 @@
+2006-11-11 Jan Hubicka <jh@suse.cz>
+
+ * tree-pass.h (pass_purge_lineno_notes): Remove declaration.
+ * modulo-sched.c (find_line_note): Remove.
+ (loop_canon_p): Do not worry about line number notes.
+ (sms_schedule): Likewise.
+ * cse.c (cse_main): Likewise.
+ * regmove.c (fixup_match_1): Likewise
+ * function.c (emit_return_info_block): Likewise.
+ (expand_function_end): Likewise.
+ (thread_prologue_an_epilogue_insns): Likewise.
+ * cfgrtl.c (try_redirect_by_replacing_jump, rtl_tidy_fallthru_edge):
+ Likewise.
+ * emit-rtl.c (find_line_note, emit_insn_after_with_line_notes,
+ emit_note_copy_after): Kill.
+ (emit_note_copy): Do not worry about line numbers.
+ * jump.c (purge_line_number_notes): Kill.
+ (pass_purge_lineno_notes): Kill.
+ * cfgcleanup.c (rest_of_handle_jump2): Kill purge_line_number_notes
+ call.
+ * rtl.h (emit_note_copy_after, emit_insn_after_with_line_notes): Kill.
+ * passes.c (init_optimization_passes): Don't purge_lineno_notes.
+ * sched-ebb.c (schedule_ebbs): Don't do rm_redundant_line_notes.
+ * tree-pass.h (pass_purge_lineno_notes): Kill.
+ * sched-ebb.c (schedule_ebb): Don't rm_line_notes,
+ rm_redundant_line_notes.
+ * sched-rgb.c (schedule_region): Don't rm_line_notes,
+ rm_redundant_line_notes.
+ * sched-int.h (rm_line_notes, rm_redundant_line_notes): Kill.
+ * haifa-sched.c: Update comment about handling notes.
+ (unlink_line_notes): Kill.
+ (rm_line_notes): Kill.
+ (save_line_notes): Simplify.
+ (rm_redundant_line_notes): Kill.
+
2006-11-11 Richard Guenther <rguenther@suse.de>
* tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR):
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 0e13f7a..33c26fb 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -2312,8 +2312,6 @@ rest_of_handle_jump2 (void)
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
- purge_line_number_notes ();
-
if (optimize)
cleanup_cfg (CLEANUP_EXPENSIVE);
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index ea39f35..0edad6a 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -866,12 +866,6 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
e->probability = REG_BR_PROB_BASE;
e->count = src->count;
- /* We don't want a block to end on a line-number note since that has
- the potential of changing the code between -g and not -g. */
- while (NOTE_P (BB_END (e->src))
- && NOTE_LINE_NUMBER (BB_END (e->src)) >= 0)
- delete_insn (BB_END (e->src));
-
if (e->dest != target)
redirect_edge_succ (e, target);
@@ -1233,11 +1227,6 @@ rtl_tidy_fallthru_edge (edge e)
#endif
q = PREV_INSN (q);
-
- /* We don't want a block to end on a line-number note since that has
- the potential of changing the code between -g and not -g. */
- while (NOTE_P (q) && NOTE_LINE_NUMBER (q) >= 0)
- q = PREV_INSN (q);
}
/* Selectively unlink the sequence. */
diff --git a/gcc/cse.c b/gcc/cse.c
index 8bd2758..dca2047 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6138,19 +6138,10 @@ cse_main (rtx f, int nregs)
/* Compute the mapping from uids to cuids.
CUIDs are numbers assigned to insns, like uids,
- except that cuids increase monotonically through the code.
- Don't assign cuids to line-number NOTEs, so that the distance in cuids
- between two insns is not affected by -g. */
+ except that cuids increase monotonically through the code. */
for (insn = f, i = 0; insn; insn = NEXT_INSN (insn))
- {
- if (!NOTE_P (insn)
- || NOTE_LINE_NUMBER (insn) < 0)
- INSN_CUID (insn) = ++i;
- else
- /* Give a line number note the same cuid as preceding insn. */
- INSN_CUID (insn) = i;
- }
+ INSN_CUID (insn) = ++i;
/* Loop over basic blocks.
Compute the maximum number of qty's needed for each basic block
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 9607bf6..114015c 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -166,7 +166,6 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
#define first_label_num (cfun->emit->x_first_label_num)
static rtx make_call_insn_raw (rtx);
-static rtx find_line_note (rtx);
static rtx change_address_1 (rtx, enum machine_mode, rtx, int);
static void unshare_all_decls (tree);
static void reset_used_decls (tree);
@@ -3663,22 +3662,6 @@ reorder_insns (rtx from, rtx to, rtx after)
}
}
-/* Return the line note insn preceding INSN. */
-
-static rtx
-find_line_note (rtx insn)
-{
- if (no_line_numbers)
- return 0;
-
- for (; insn; insn = PREV_INSN (insn))
- if (NOTE_P (insn)
- && NOTE_LINE_NUMBER (insn) >= 0)
- break;
-
- return insn;
-}
-
/* Emit insn(s) of given code and pattern
at a specified place within the doubly-linked list.
@@ -3963,22 +3946,6 @@ emit_insn_after_noloc (rtx x, rtx after)
return last;
}
-/* Similar to emit_insn_after, except that line notes are to be inserted so
- as to act as if this insn were at FROM. */
-
-void
-emit_insn_after_with_line_notes (rtx x, rtx after, rtx from)
-{
- rtx from_line = find_line_note (from);
- rtx after_line = find_line_note (after);
- rtx insn = emit_insn_after (x, after);
-
- if (from_line)
- emit_note_copy_after (from_line, after);
-
- if (after_line)
- emit_note_copy_after (after_line, insn);
-}
/* Make an insn of code JUMP_INSN with body X
and output it after the insn AFTER. */
@@ -4098,28 +4065,6 @@ emit_note_after (int subtype, rtx after)
add_insn_after (note, after);
return note;
}
-
-/* Emit a copy of note ORIG after the insn AFTER. */
-
-rtx
-emit_note_copy_after (rtx orig, rtx after)
-{
- rtx note;
-
- if (NOTE_LINE_NUMBER (orig) >= 0 && no_line_numbers)
- {
- cur_insn_uid++;
- return 0;
- }
-
- note = rtx_alloc (NOTE);
- INSN_UID (note) = cur_insn_uid++;
- NOTE_LINE_NUMBER (note) = NOTE_LINE_NUMBER (orig);
- NOTE_DATA (note) = NOTE_DATA (orig);
- BLOCK_FOR_INSN (note) = NULL;
- add_insn_after (note, after);
- return note;
-}
/* Like emit_insn_after_noloc, but set INSN_LOCATOR according to SCOPE. */
rtx
@@ -4504,12 +4449,6 @@ emit_note_copy (rtx orig)
{
rtx note;
- if (NOTE_LINE_NUMBER (orig) >= 0 && no_line_numbers)
- {
- cur_insn_uid++;
- return NULL_RTX;
- }
-
note = rtx_alloc (NOTE);
INSN_UID (note) = cur_insn_uid++;
diff --git a/gcc/function.c b/gcc/function.c
index cef7fe3..a27d8cb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -203,7 +203,7 @@ extern tree debug_find_var_in_block_tree (tree, tree);
static void record_insns (rtx, VEC(int,heap) **) ATTRIBUTE_UNUSED;
static int contains (rtx, VEC(int,heap) **);
#ifdef HAVE_return
-static void emit_return_into_block (basic_block, rtx);
+static void emit_return_into_block (basic_block);
#endif
#if defined(HAVE_epilogue) && defined(INCOMING_RETURN_ADDR_RTX)
static rtx keep_stack_depressed (rtx);
@@ -4340,14 +4340,6 @@ expand_function_end (void)
without returning a value. */
emit_note (NOTE_INSN_FUNCTION_END);
- /* Must mark the last line number note in the function, so that the test
- coverage code can avoid counting the last line twice. This just tells
- the code to ignore the immediately following line note, since there
- already exists a copy of this note somewhere above. This line number
- note is still needed for debugging though, so we can't delete it. */
- if (flag_test_coverage)
- emit_note (NOTE_INSN_REPEATED_LINE_NUMBER);
-
/* Output a linenumber for the end of the function.
SDB depends on this. */
force_next_line_note ();
@@ -4653,11 +4645,9 @@ sibcall_epilogue_contains (rtx insn)
block_for_insn appropriately. */
static void
-emit_return_into_block (basic_block bb, rtx line_note)
+emit_return_into_block (basic_block bb)
{
emit_jump_insn_after (gen_return (), BB_END (bb));
- if (line_note)
- emit_note_copy_after (line_note, PREV_INSN (BB_END (bb)));
}
#endif /* HAVE_return */
@@ -5123,18 +5113,6 @@ thread_prologue_and_epilogue_insns (rtx f ATTRIBUTE_UNUSED)
if (BB_HEAD (last) == label && LABEL_P (label))
{
edge_iterator ei2;
- rtx epilogue_line_note = NULL_RTX;
-
- /* Locate the line number associated with the closing brace,
- if we can find one. */
- for (seq = get_last_insn ();
- seq && ! active_insn_p (seq);
- seq = PREV_INSN (seq))
- if (NOTE_P (seq) && NOTE_LINE_NUMBER (seq) > 0)
- {
- epilogue_line_note = seq;
- break;
- }
for (ei2 = ei_start (last->preds); (e = ei_safe_edge (ei2)); )
{
@@ -5158,7 +5136,7 @@ thread_prologue_and_epilogue_insns (rtx f ATTRIBUTE_UNUSED)
with a simple return instruction. */
if (simplejump_p (jump))
{
- emit_return_into_block (bb, epilogue_line_note);
+ emit_return_into_block (bb);
delete_insn (jump);
}
@@ -5195,7 +5173,7 @@ thread_prologue_and_epilogue_insns (rtx f ATTRIBUTE_UNUSED)
this is still reachable will be determined later. */
emit_barrier_after (BB_END (last));
- emit_return_into_block (last, epilogue_line_note);
+ emit_return_into_block (last);
epilogue_end = BB_END (last);
single_succ_edge (last)->flags &= ~EDGE_FALLTHRU;
goto epilogue_done;
@@ -5297,61 +5275,6 @@ epilogue_done:
}
#endif
-#ifdef HAVE_prologue
- /* This is probably all useless now that we use locators. */
- if (prologue_end)
- {
- rtx insn, prev;
-
- /* GDB handles `break f' by setting a breakpoint on the first
- line note after the prologue. Which means (1) that if
- there are line number notes before where we inserted the
- prologue we should move them, and (2) we should generate a
- note before the end of the first basic block, if there isn't
- one already there.
-
- ??? This behavior is completely broken when dealing with
- multiple entry functions. We simply place the note always
- into first basic block and let alternate entry points
- to be missed.
- */
-
- for (insn = prologue_end; insn; insn = prev)
- {
- prev = PREV_INSN (insn);
- if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- {
- /* Note that we cannot reorder the first insn in the
- chain, since rest_of_compilation relies on that
- remaining constant. */
- if (prev == NULL)
- break;
- reorder_insns (insn, insn, prologue_end);
- }
- }
-
- /* Find the last line number note in the first block. */
- for (insn = BB_END (ENTRY_BLOCK_PTR->next_bb);
- insn != prologue_end && insn;
- insn = PREV_INSN (insn))
- if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- break;
-
- /* If we didn't find one, make a copy of the first line number
- we run across. */
- if (! insn)
- {
- for (insn = next_active_insn (prologue_end);
- insn;
- insn = PREV_INSN (insn))
- if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- {
- emit_note_copy_after (insn, prologue_end);
- break;
- }
- }
- }
-#endif
#ifdef HAVE_epilogue
if (epilogue_end)
{
@@ -5366,8 +5289,7 @@ epilogue_done:
{
next = NEXT_INSN (insn);
if (NOTE_P (insn)
- && (NOTE_LINE_NUMBER (insn) > 0
- || NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG
+ && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_END))
reorder_insns (insn, insn, PREV_INSN (epilogue_end));
}
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index ebe7f24..6cd1fe1 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -511,26 +511,18 @@ static void advance_one_cycle (void);
Generally, NOTES are saved before scheduling and restored after scheduling.
The scheduler distinguishes between three types of notes:
- (1) LINE_NUMBER notes, generated and used for debugging. Here,
- before scheduling a region, a pointer to the LINE_NUMBER note is
- added to the insn following it (in save_line_notes()), and the note
- is removed (in rm_line_notes() and unlink_line_notes()). After
- scheduling the region, this pointer is used for regeneration of
- the LINE_NUMBER note (in restore_line_notes()).
-
- (2) LOOP_BEGIN, LOOP_END, SETJMP, EHREGION_BEG, EHREGION_END notes:
+ (1) LOOP_BEGIN, LOOP_END, SETJMP, EHREGION_BEG, EHREGION_END notes:
Before scheduling a region, a pointer to the note is added to the insn
that follows or precedes it. (This happens as part of the data dependence
computation). After scheduling an insn, the pointer contained in it is
used for regenerating the corresponding note (in reemit_notes).
- (3) All other notes (e.g. INSN_DELETED): Before scheduling a block,
+ (2) All other notes (e.g. INSN_DELETED): Before scheduling a block,
these notes are put in a list (in rm_other_notes() and
unlink_other_notes ()). After scheduling the block, these notes are
inserted at the beginning of the block (in schedule_block()). */
static rtx unlink_other_notes (rtx, rtx);
-static rtx unlink_line_notes (rtx, rtx);
static void reemit_notes (rtx);
static rtx *ready_lastpos (struct ready_list *);
@@ -1276,50 +1268,6 @@ unlink_other_notes (rtx insn, rtx tail)
return insn;
}
-/* Delete line notes beginning with INSN. Record line-number notes so
- they can be reused. Returns the insn following the notes. */
-
-static rtx
-unlink_line_notes (rtx insn, rtx tail)
-{
- rtx prev = PREV_INSN (insn);
-
- while (insn != tail && NOTE_NOT_BB_P (insn))
- {
- rtx next = NEXT_INSN (insn);
-
- if (write_symbols != NO_DEBUG && NOTE_LINE_NUMBER (insn) > 0)
- {
- basic_block bb = BLOCK_FOR_INSN (insn);
-
- /* Delete the note from its current position. */
- if (prev)
- NEXT_INSN (prev) = next;
- if (next)
- PREV_INSN (next) = prev;
-
- if (bb)
- {
- /* Basic block can begin with either LABEL or
- NOTE_INSN_BASIC_BLOCK. */
- gcc_assert (BB_HEAD (bb) != insn);
-
- /* Check if we are removing last insn in the BB. */
- if (BB_END (bb) == insn)
- BB_END (bb) = prev;
- }
-
- /* Record line-number notes so they can be reused. */
- LINE_NOTE (insn) = insn;
- }
- else
- prev = insn;
-
- insn = next;
- }
- return insn;
-}
-
/* Return the head and tail pointers of ebb starting at BEG and ending
at END. */
@@ -1373,34 +1321,6 @@ no_real_insns_p (rtx head, rtx tail)
return 1;
}
-/* Delete line notes from one block. Save them so they can be later restored
- (in restore_line_notes). HEAD and TAIL are the boundaries of the
- block in which notes should be processed. */
-
-void
-rm_line_notes (rtx head, rtx tail)
-{
- rtx next_tail;
- rtx insn;
-
- next_tail = NEXT_INSN (tail);
- for (insn = head; insn != next_tail; insn = NEXT_INSN (insn))
- {
- rtx prev;
-
- /* Farm out notes, and maybe save them in NOTE_LIST.
- This is needed to keep the debugger from
- getting completely deranged. */
- if (NOTE_NOT_BB_P (insn))
- {
- prev = insn;
- insn = unlink_line_notes (insn, next_tail);
-
- gcc_assert (prev != tail && prev != head && insn != next_tail);
- }
- }
-}
-
/* Save line number notes for each insn in block B. HEAD and TAIL are
the boundaries of the block in which notes should be processed. */
@@ -1420,10 +1340,7 @@ save_line_notes (int b, rtx head, rtx tail)
next_tail = NEXT_INSN (tail);
for (insn = head; insn != next_tail; insn = NEXT_INSN (insn))
- if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- line = insn;
- else
- LINE_NOTE (insn) = line;
+ LINE_NOTE (insn) = line;
}
/* After a block was scheduled, insert line notes into the insns list.
@@ -1497,58 +1414,6 @@ restore_line_notes (rtx head, rtx tail)
fprintf (sched_dump, ";; added %d line-number notes\n", added_notes);
}
-/* After scheduling the function, delete redundant line notes from the
- insns list. */
-
-void
-rm_redundant_line_notes (void)
-{
- rtx line = 0;
- rtx insn = get_insns ();
- int active_insn = 0;
- int notes = 0;
-
- /* Walk the insns deleting redundant line-number notes. Many of these
- are already present. The remainder tend to occur at basic
- block boundaries. */
- for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
- if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- {
- /* If there are no active insns following, INSN is redundant. */
- if (active_insn == 0)
- {
- notes++;
- 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)
-#endif
-)
- {
- notes++;
- SET_INSN_DELETED (line);
- line = insn;
- }
- else
- line = insn;
- active_insn = 0;
- }
- else if (!((NOTE_P (insn)
- && NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
- || (NONJUMP_INSN_P (insn)
- && (GET_CODE (PATTERN (insn)) == USE
- || GET_CODE (PATTERN (insn)) == CLOBBER))))
- active_insn++;
-
- if (sched_verbose && notes)
- fprintf (sched_dump, ";; deleted %d line-number notes\n", notes);
-}
-
/* Delete notes between HEAD and TAIL and put them in the chain
of notes ended by NOTE_LIST. */
diff --git a/gcc/jump.c b/gcc/jump.c
index b087394..f42ee5a 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -140,62 +140,6 @@ struct tree_opt_pass pass_cleanup_barriers =
0 /* letter */
};
-unsigned int
-purge_line_number_notes (void)
-{
- rtx last_note = 0;
- rtx insn;
- /* Delete extraneous line number notes.
- Note that two consecutive notes for different lines are not really
- extraneous. There should be some indication where that line belonged,
- even if it became empty. */
-
- for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
- if (NOTE_P (insn))
- {
- if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
- /* Any previous line note was for the prologue; gdb wants a new
- note after the prologue even if it is for the same line. */
- last_note = NULL_RTX;
- else if (NOTE_LINE_NUMBER (insn) >= 0)
- {
- /* Delete this note if it is identical to previous note. */
- if (last_note
-#ifdef USE_MAPPED_LOCATION
- && NOTE_SOURCE_LOCATION (insn) == NOTE_SOURCE_LOCATION (last_note)
-#else
- && NOTE_SOURCE_FILE (insn) == NOTE_SOURCE_FILE (last_note)
- && NOTE_LINE_NUMBER (insn) == NOTE_LINE_NUMBER (last_note)
-#endif
-)
- {
- delete_related_insns (insn);
- continue;
- }
-
- last_note = insn;
- }
- }
- return 0;
-}
-
-struct tree_opt_pass pass_purge_lineno_notes =
-{
- "elnotes", /* name */
- NULL, /* gate */
- purge_line_number_notes, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- 0, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func, /* todo_flags_finish */
- 0 /* letter */
-};
-
/* Initialize LABEL_NUSES and JUMP_LABEL fields. Delete any REG_LABEL
notes whose labels don't occur in the insn any more. Returns the
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 56df63c..8426ba6 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -761,19 +761,6 @@ generate_prolog_epilog (partial_schedule_ptr ps, struct loop * loop, rtx count_r
end_sequence ();
}
-/* Return the line note insn preceding INSN, for debugging. Taken from
- emit-rtl.c. */
-static rtx
-find_line_note (rtx insn)
-{
- for (; insn; insn = PREV_INSN (insn))
- if (NOTE_P (insn)
- && NOTE_LINE_NUMBER (insn) >= 0)
- break;
-
- return insn;
-}
-
/* Return true if all the BBs of the loop are empty except the
loop header. */
static bool
@@ -831,16 +818,7 @@ loop_canon_p (struct loop *loop)
{
if (dump_file)
{
- rtx line_note = find_line_note (BB_END (loop->header));
-
fprintf (dump_file, "SMS loop many exits ");
- if (line_note)
- {
- expanded_location xloc;
- NOTE_EXPANDED_LOCATION (xloc, line_note);
- fprintf (dump_file, " %s %d (file, line)\n",
- xloc.file, xloc.line);
- }
}
return false;
}
@@ -849,16 +827,7 @@ loop_canon_p (struct loop *loop)
{
if (dump_file)
{
- rtx line_note = find_line_note (BB_END (loop->header));
-
fprintf (dump_file, "SMS loop many BBs. ");
- if (line_note)
- {
- expanded_location xloc;
- NOTE_EXPANDED_LOCATION (xloc, line_note);
- fprintf (dump_file, " %s %d (file, line)\n",
- xloc.file, xloc.line);
- }
}
return false;
}
@@ -986,15 +955,6 @@ sms_schedule (void)
{
if (dump_file)
{
- rtx line_note = find_line_note (tail);
-
- if (line_note)
- {
- expanded_location xloc;
- NOTE_EXPANDED_LOCATION (xloc, line_note);
- fprintf (dump_file, "SMS bb %s %d (file, line)\n",
- xloc.file, xloc.line);
- }
fprintf (dump_file, "SMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
@@ -1084,15 +1044,6 @@ sms_schedule (void)
if (dump_file)
{
- rtx line_note = find_line_note (tail);
-
- if (line_note)
- {
- expanded_location xloc;
- NOTE_EXPANDED_LOCATION (xloc, line_note);
- fprintf (dump_file, "SMS bb %s %d (file, line)\n",
- xloc.file, xloc.line);
- }
fprintf (dump_file, "SMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
diff --git a/gcc/passes.c b/gcc/passes.c
index 9d585d3..05288b6a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -683,7 +683,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_variable_tracking);
NEXT_PASS (pass_free_cfg);
NEXT_PASS (pass_machine_reorg);
- NEXT_PASS (pass_purge_lineno_notes);
NEXT_PASS (pass_cleanup_barriers);
NEXT_PASS (pass_delay_slots);
NEXT_PASS (pass_split_for_shorten_branches);
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 84c811a..4bd5d1d 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -1894,15 +1894,9 @@ fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
{
rtx notes = REG_NOTES (insn);
- emit_insn_after_with_line_notes (pat, PREV_INSN (p), insn);
+ p = emit_insn_after_setloc (pat, PREV_INSN (p), INSN_LOCATOR (insn));
delete_insn (insn);
- /* emit_insn_after_with_line_notes has no
- return value, so search for the new insn. */
- insn = p;
- while (! INSN_P (insn) || PATTERN (insn) != pat)
- insn = PREV_INSN (insn);
-
- REG_NOTES (insn) = notes;
+ REG_NOTES (p) = notes;
}
}
/* Sometimes we'd generate src = const; src += n;
diff --git a/gcc/rtl.h b/gcc/rtl.h
index a678c41..abc3d5a 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1553,7 +1553,6 @@ extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
extern rtx emit_barrier_after (rtx);
extern rtx emit_label_after (rtx, rtx);
extern rtx emit_note_after (int, rtx);
-extern rtx emit_note_copy_after (rtx, rtx);
extern rtx emit_insn (rtx);
extern rtx emit_jump_insn (rtx);
extern rtx emit_call_insn (rtx);
@@ -2065,7 +2064,6 @@ extern void add_insn (rtx);
extern void add_insn_before (rtx, rtx);
extern void add_insn_after (rtx, rtx);
extern void remove_insn (rtx);
-extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
extern rtx emit (rtx);
extern void renumber_insns (void);
extern rtx delete_insn (rtx);
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index b2e82b5..19c60cf 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -482,7 +482,6 @@ schedule_ebb (rtx head, rtx tail)
if (write_symbols != NO_DEBUG)
{
save_line_notes (first_bb->index, head, tail);
- rm_line_notes (head, tail);
}
/* rm_other_notes only removes notes which are _inside_ the
@@ -681,9 +680,6 @@ schedule_ebbs (void)
if (reload_completed)
reposition_prologue_and_epilogue_notes (get_insns ());
- if (write_symbols != NO_DEBUG)
- rm_redundant_line_notes ();
-
sched_finish ();
}
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index d2c6c62..000af71 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -634,10 +634,8 @@ extern int haifa_classify_insn (rtx);
extern void get_ebb_head_tail (basic_block, basic_block, rtx *, rtx *);
extern int no_real_insns_p (rtx, rtx);
-extern void rm_line_notes (rtx, rtx);
extern void save_line_notes (int, rtx, rtx);
extern void restore_line_notes (rtx, rtx);
-extern void rm_redundant_line_notes (void);
extern void rm_other_notes (rtx, rtx);
extern int insn_cost (rtx, rtx, rtx);
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 4c9c0de..47d0a9a 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2787,7 +2787,6 @@ schedule_region (int rgn)
if (write_symbols != NO_DEBUG)
{
save_line_notes (b, head, tail);
- rm_line_notes (head, tail);
}
/* rm_other_notes only removes notes which are _inside_ the
@@ -3045,10 +3044,6 @@ schedule_insns (void)
if (reload_completed)
reposition_prologue_and_epilogue_notes (get_insns ());
- /* Delete redundant line notes. */
- if (write_symbols != NO_DEBUG)
- rm_redundant_line_notes ();
-
if (sched_verbose)
{
if (reload_completed == 0 && flag_schedule_interblock)
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 3ab0ef7..d6838d2 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -386,7 +386,6 @@ extern struct tree_opt_pass pass_duplicate_computed_gotos;
extern struct tree_opt_pass pass_variable_tracking;
extern struct tree_opt_pass pass_free_cfg;
extern struct tree_opt_pass pass_machine_reorg;
-extern struct tree_opt_pass pass_purge_lineno_notes;
extern struct tree_opt_pass pass_cleanup_barriers;
extern struct tree_opt_pass pass_delay_slots;
extern struct tree_opt_pass pass_split_for_shorten_branches;