cfgloopmanip.c (create_loop_notes): Removed.
authorZdenek Dvorak <dvorakz@suse.cz>
Thu, 23 Mar 2006 10:33:38 +0000 (11:33 +0100)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Thu, 23 Mar 2006 10:33:38 +0000 (10:33 +0000)
* cfgloopmanip.c (create_loop_notes): Removed.
* final.c (final_scan_insn): Do not handle loop notes.
* jump.c (squeeze_notes): Ditto.
* cfglayout.c (skip_insns_after_block,
duplicate_insn_chain): Ditto.
* cfgcleanup.c (rest_of_handle_jump2): Do not call
create_loop_notes.
* cfgloop.h (create_loop_notes): Declaration removed.

From-SVN: r112316

gcc/ChangeLog
gcc/cfgcleanup.c
gcc/cfglayout.c
gcc/cfgloop.h
gcc/cfgloopmanip.c
gcc/final.c
gcc/jump.c

index 2f1f54872ae2818de09b6f6f9a765148595a8d41..e573c23d577d9bd26bbafff5eca80cecf22bb5d6 100644 (file)
@@ -1,3 +1,14 @@
+2006-03-23  Zdenek Dvorak <dvorakz@suse.cz>
+
+       * cfgloopmanip.c (create_loop_notes): Removed.
+       * final.c (final_scan_insn): Do not handle loop notes.
+       * jump.c (squeeze_notes): Ditto.
+       * cfglayout.c (skip_insns_after_block,
+       duplicate_insn_chain): Ditto.
+       * cfgcleanup.c (rest_of_handle_jump2): Do not call
+       create_loop_notes.
+       * cfgloop.h (create_loop_notes): Declaration removed.
+
 2006-03-23  Richard Sandiford  <richard@codesourcery.com>
 
        * varasm.c (output_constant_pool): Restore fnname and fndecl
index cd9d708961d5f950a45d0fc3f888c4737c5a7eeb..954a9569f16dd12751b89a7c6b617808602fd724 100644 (file)
@@ -2312,8 +2312,6 @@ rest_of_handle_jump2 (void)
   cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
                | (flag_thread_jumps ? CLEANUP_THREADING : 0));
 
-  create_loop_notes ();
-
   purge_line_number_notes ();
 
   if (optimize)
index bcdeb96c1309a95667a0289378118ca5b3f353d5..f427a2bb57e148b674a54b2fb0443fbb49547bed 100644 (file)
@@ -99,7 +99,6 @@ skip_insns_after_block (basic_block bb)
        case NOTE:
          switch (NOTE_LINE_NUMBER (insn))
            {
-           case NOTE_INSN_LOOP_END:
            case NOTE_INSN_BLOCK_END:
              last_insn = insn;
              continue;
@@ -135,12 +134,12 @@ skip_insns_after_block (basic_block bb)
   /* It is possible to hit contradictory sequence.  For instance:
 
      jump_insn
-     NOTE_INSN_LOOP_BEG
+     NOTE_INSN_BLOCK_BEG
      barrier
 
      Where barrier belongs to jump_insn, but the note does not.  This can be
      created by removing the basic block originally following
-     NOTE_INSN_LOOP_BEG.  In such case reorder the notes.  */
+     NOTE_INSN_BLOCK_BEG.  In such case reorder the notes.  */
 
   for (insn = last_insn; insn != BB_END (bb); insn = prev)
     {
@@ -148,7 +147,6 @@ skip_insns_after_block (basic_block bb)
       if (NOTE_P (insn))
        switch (NOTE_LINE_NUMBER (insn))
          {
-         case NOTE_INSN_LOOP_END:
          case NOTE_INSN_BLOCK_END:
          case NOTE_INSN_DELETED:
          case NOTE_INSN_DELETED_LABEL:
@@ -986,10 +984,6 @@ duplicate_insn_chain (rtx from, rtx to)
                 in first BB, we may want to copy the block.  */
            case NOTE_INSN_PROLOGUE_END:
 
-           case NOTE_INSN_LOOP_BEG:
-           case NOTE_INSN_LOOP_END:
-             /* Strip down the loop notes - we don't really want to keep
-                them consistent in loop copies.  */
            case NOTE_INSN_DELETED:
            case NOTE_INSN_DELETED_LABEL:
              /* No problem to strip these.  */
index c2f7bbb36380c7b76be4554a8916a87c6cf03451..3309e0fdca9a20ea1b7fdfdbb36dc5fb09726694 100644 (file)
@@ -198,7 +198,6 @@ int flow_loop_nodes_find (basic_block, struct loop *);
 void fix_loop_structure (struct loops *, bitmap changed_bbs);
 void mark_irreducible_loops (struct loops *);
 void mark_single_exit_loops (struct loops *);
-extern void create_loop_notes (void);
 
 /* Loop data structure manipulation/querying.  */
 extern void flow_loop_tree_node_add (struct loop *, struct loop *);
index bb7aca0faebdd060ddf63705b987bd6b4ab1c123..79c5142a078f90bbebaf13ab53632ff24b626e4f 100644 (file)
@@ -1275,100 +1275,6 @@ loop_split_edge_with (edge e, rtx insns)
   return new_bb;
 }
 
-/* Uses the natural loop discovery to recreate loop notes.  */
-void
-create_loop_notes (void)
-{
-  rtx insn, head, end;
-  struct loops loops;
-  struct loop *loop;
-  basic_block *first, *last, bb, pbb;
-  struct loop **stack, **top;
-
-#ifdef ENABLE_CHECKING
-  /* Verify that there really are no loop notes.  */
-  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
-    gcc_assert (!NOTE_P (insn) ||
-               NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_BEG);
-#endif
-
-  flow_loops_find (&loops);
-  free_dominance_info (CDI_DOMINATORS);
-  if (loops.num > 1)
-    {
-      last = XCNEWVEC (basic_block, loops.num);
-
-      FOR_EACH_BB (bb)
-       {
-         for (loop = bb->loop_father; loop->outer; loop = loop->outer)
-           last[loop->num] = bb;
-       }
-
-      first = XCNEWVEC (basic_block, loops.num);
-      stack = XCNEWVEC (struct loop *, loops.num);
-      top = stack;
-
-      FOR_EACH_BB (bb)
-       {
-         for (loop = bb->loop_father; loop->outer; loop = loop->outer)
-           {
-             if (!first[loop->num])
-               {
-                 *top++ = loop;
-                 first[loop->num] = bb;
-               }
-
-             if (bb == last[loop->num])
-               {
-                 /* Prevent loops from overlapping.  */
-                 while (*--top != loop)
-                   last[(*top)->num] = EXIT_BLOCK_PTR;
-
-                 /* If loop starts with jump into it, place the note in
-                    front of the jump.  */
-                 insn = PREV_INSN (BB_HEAD (first[loop->num]));
-                 if (insn
-                     && BARRIER_P (insn))
-                   insn = PREV_INSN (insn);
-                 
-                 if (insn
-                     && JUMP_P (insn)
-                     && any_uncondjump_p (insn)
-                     && onlyjump_p (insn))
-                   {
-                     pbb = BLOCK_FOR_INSN (insn);
-                     gcc_assert (pbb && single_succ_p (pbb));
-
-                     if (!flow_bb_inside_loop_p (loop, single_succ (pbb)))
-                       insn = BB_HEAD (first[loop->num]);
-                   }
-                 else
-                   insn = BB_HEAD (first[loop->num]);
-                   
-                 head = BB_HEAD (first[loop->num]);
-                 emit_note_before (NOTE_INSN_LOOP_BEG, insn);
-                 BB_HEAD (first[loop->num]) = head;
-
-                 /* Position the note correctly wrto barrier.  */
-                 insn = BB_END (last[loop->num]);
-                 if (NEXT_INSN (insn)
-                     && BARRIER_P (NEXT_INSN (insn)))
-                   insn = NEXT_INSN (insn);
-                 
-                 end = BB_END (last[loop->num]);
-                 emit_note_after (NOTE_INSN_LOOP_END, insn);
-                 BB_END (last[loop->num]) = end;
-               }
-           }
-       }
-
-      free (first);
-      free (last);
-      free (stack);
-    }
-  flow_loops_free (&loops);
-}
-
 /* This function is called from loop_version.  It splits the entry edge
    of the loop we want to version, adds the versioning condition, and
    adjust the edges to the two versions of the loop appropriately.
index 4a5fd1815d8ca7783dd11fc051e62bca474205dc..0cb985fd4d67f576dfc577786cc246e66e974fbc 100644 (file)
@@ -1697,8 +1697,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
       switch (NOTE_LINE_NUMBER (insn))
        {
        case NOTE_INSN_DELETED:
-       case NOTE_INSN_LOOP_BEG:
-       case NOTE_INSN_LOOP_END:
        case NOTE_INSN_FUNCTION_END:
        case NOTE_INSN_REPEATED_LINE_NUMBER:
        case NOTE_INSN_EXPECTED_VALUE:
index 79a21b4d1aeb885e5f24d210a8bbd4211e49c77b..b60c2840720a498b4201c32ee59d85baec457317 100644 (file)
@@ -260,11 +260,11 @@ mark_all_labels (rtx f)
       }
 }
 \f
-/* Move all block-beg, block-end, loop-beg, loop-cont, loop-vtop, loop-end,
-   notes between START and END out before START.  START and END may be such
-   notes.  Returns the values of the new starting and ending insns, which
-   may be different if the original ones were such notes.
-   Return true if there were only such notes and no real instructions.  */
+/* Move all block-beg, block-end and loop-beg notes between START and END out
+   before START.  START and END may be such notes.  Returns the values of the
+   new starting and ending insns, which may be different if the original ones
+   were such notes.  Return true if there were only such notes and no real
+   instructions.  */
 
 bool
 squeeze_notes (rtx* startp, rtx* endp)
@@ -282,9 +282,7 @@ squeeze_notes (rtx* startp, rtx* endp)
       next = NEXT_INSN (insn);
       if (NOTE_P (insn)
          && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END
-             || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG
-             || NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
-             || NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END))
+             || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG))
        {
          /* BLOCK_BEG or BLOCK_END notes only exist in the `final' pass.  */
          gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_BEG