]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (try_split): Use delete_insns.
authorJan Hubicka <jh@suse.cz>
Thu, 14 Mar 2002 18:09:49 +0000 (18:09 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 14 Mar 2002 18:09:49 +0000 (18:09 +0000)
* emit-rtl.c (try_split): Use delete_insns.
* recog.c (split_all_insns): Fix terminating condition.

From-SVN: r50778

gcc/ChangeLog
gcc/emit-rtl.c
gcc/recog.c

index 709590399299a0a929e97e03028c245bcd2726a7..0fa84767f80418d7f0bc6532a1587fd7d8d870d8 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar 14 19:04:29 CET 2002  Jan HUbicka  <jh@suse.cz>
+
+       * emit-rtl.c (try_split): Use delete_insns.
+       * recog.c (split_all_insns): Fix terminating condition.
+
 2002-03-14  Richard Earnshaw  <rearnsha@arm.com>
            Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
 
index 4d82afb68851b06adb101c3e625dbc2ee3f239e8..937bd2064e050fc3920ae27282bc9da32373ff1b 100644 (file)
@@ -3076,7 +3076,7 @@ try_split (pat, trial, last)
 
          tem = emit_insn_after (seq, trial);
 
-         delete_related_insns (trial);
+         delete_insn (trial);
          if (has_barrier)
            emit_barrier_after (tem);
 
index 8ad3ed2a1ceffab2974ced0647dbe1aa5cddb3f9..cb1cb666a8c3bfbdd1014f2a8da3ea650e0705e1 100644 (file)
@@ -2735,14 +2735,16 @@ split_all_insns (upd_life)
     {
       basic_block bb = BASIC_BLOCK (i);
       rtx insn, next;
+      bool finish = false;
 
-      for (insn = bb->head; insn ; insn = next)
+      for (insn = bb->head; !finish ; insn = next)
        {
          rtx last;
 
          /* Can't use `next_real_insn' because that might go across
             CODE_LABELS and short-out basic blocks.  */
          next = NEXT_INSN (insn);
+         finish = (insn == bb->end);
          last = split_insn (insn);
          if (last)
            {
@@ -2756,13 +2758,7 @@ split_all_insns (upd_life)
              changed = 1;
              insn = last;
            }
-
-         if (next == NEXT_INSN (bb->end))
-           break;
        }
-
-      if (insn == NULL)
-       abort ();
     }
 
   if (changed)