]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-pass.h (pass_purge_lineno_notes): Remove declaration.
authorJan Hubicka <jh@suse.cz>
Sat, 11 Nov 2006 15:50:16 +0000 (16:50 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 11 Nov 2006 15:50:16 +0000 (15:50 +0000)
* 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.

From-SVN: r118693

16 files changed:
gcc/ChangeLog
gcc/cfgcleanup.c
gcc/cfgrtl.c
gcc/cse.c
gcc/emit-rtl.c
gcc/function.c
gcc/haifa-sched.c
gcc/jump.c
gcc/modulo-sched.c
gcc/passes.c
gcc/regmove.c
gcc/rtl.h
gcc/sched-ebb.c
gcc/sched-int.h
gcc/sched-rgn.c
gcc/tree-pass.h

index 653de70c8278a98f229b6cd97066c7850e016c61..7ddbac97c2b99ac79a0fead20024e7d623af9edb 100644 (file)
@@ -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):
index 0e13f7a07cf83430b08b0cf2160efef9820d2fef..33c26fb4071b7a7fe95dfc050324e887c0e5d270 100644 (file)
@@ -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);
 
index ea39f35cc2084a12dd98090696e27590f7a63102..0edad6a1af316888b4122f883c50a8fcbc853233 100644 (file)
@@ -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.  */
index 8bd275859417727b4738e04e8cb98063f7e188c8..dca20477f5d2332235fab85331ee09e5fbaf3597 100644 (file)
--- 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
index 9607bf6965360320e49506cc8b524ddd1f2e8ab5..114015c8a2d6126f94a0f6d1eeb12c334d2bd398 100644 (file)
@@ -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;
-}
-
 \f
 /* 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;
-}
 \f
 /* 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++;
index cef7fe3f10cb979da1b6accfcf971f4f6142dcbb..a27d8cbb19f6bc504f74d7d38243d786e2506b2a 100644 (file)
@@ -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));
        }
index ebe7f24ebb53466468e4a536d42936e471449e80..6cd1fe1e18576f2cbed6374e88b5dac35ae71ba8 100644 (file)
@@ -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.  */
 
index b087394162026273300796f00e669697e2a5ae12..f42ee5a43ab956972b3ff00f4fcd272475234e9c 100644 (file)
@@ -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 */
-};
-
 \f
 /* Initialize LABEL_NUSES and JUMP_LABEL fields.  Delete any REG_LABEL
    notes whose labels don't occur in the insn any more.  Returns the
index 56df63c894c14768a4657ade6a7cc2ac180d3263..8426ba6313a963cae175c0b444afc1b3e1d4e4f6 100644 (file)
@@ -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)
            {
index 9d585d3bf6a4bcea61618730ff57f4d2bc07d528..05288b6a149521db13de6a7c6f89a908ec01cd3a 100644 (file)
@@ -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);
index 84c811a1d648e036db5645c9dd01fc4ae33e6a2a..4bd5d1da9915b97ba7486cd8ad04877818522c22 100644 (file)
@@ -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;
index a678c41fce536be093cb03d07098b88591f80f93..abc3d5a0670f371af45716799e19f20b2c3a62f1 100644 (file)
--- 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);
index b2e82b591824c180c95c2b3187c4fddbc47e488a..19c60cf9f0dc7bf118949fcb49a58758efb118c6 100644 (file)
@@ -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 ();
 }
 
index d2c6c62c96960535a3e1c522f7598fe90c1308a5..000af71433697395527b426ff72ee7608831c2fc 100644 (file)
@@ -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);
index 4c9c0dec2c26af1a181274c7733c35ccf81420bd..47d0a9a17a30432d5e412bb5e84608201f5bd6cc 100644 (file)
@@ -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)
index 3ab0ef730b713696bc01e8066b0c2d31f733992d..d6838d2081fe7eaa12e31f2f600d0c538ccc2363 100644 (file)
@@ -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;