]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2.
authorRichard Henderson <rth@redhat.com>
Sun, 23 Mar 2003 20:40:26 +0000 (12:40 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 23 Mar 2003 20:40:26 +0000 (12:40 -0800)
        * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps
        before flow2.
        * cfgrtl.c (try_redirect_by_replacing_jump): Similarly.

From-SVN: r64754

gcc/ChangeLog
gcc/cfgcleanup.c
gcc/cfgrtl.c

index 65799f5332718ee717d04f331a5834225f826f00..f98fa02a882446c050f21d9ce48a1c90fc73914a 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-23  Richard Henderson  <rth@redhat.com>
+
+       * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps
+       before flow2.
+       * cfgrtl.c (try_redirect_by_replacing_jump): Similarly.
+
 2003-03-23  Richard Henderson  <rth@redhat.com>
 
        PR opt/10116
index 42dc0a9e4c5f508d826113da24ef61d7bbc9cb47..23436d599f102420ee2e4a2bb32906c8b79ee09b 100644 (file)
@@ -1791,7 +1791,9 @@ try_optimize_cfg (mode)
                  /* If the jump insn has side effects,
                     we can't kill the edge.  */
                  && (GET_CODE (b->end) != JUMP_INSN
-                     || simplejump_p (b->end))
+                     || (flow2_completed
+                         ? simplejump_p (b->end)
+                         : onlyjump_p (b->end)))
                  && (next = merge_blocks (s, b, c, mode)))
                {
                  b = next;
index 31f71106251ed454074cc74b5518ab1f600c4c2e..01b7e92c2cb08fc6e1a02b034dc64541546d483a 100644 (file)
@@ -684,7 +684,7 @@ try_redirect_by_replacing_jump (e, target)
 
   if (tmp || !onlyjump_p (insn))
     return false;
-  if (reload_completed && JUMP_LABEL (insn)
+  if (flow2_completed && JUMP_LABEL (insn)
       && (table = NEXT_INSN (JUMP_LABEL (insn))) != NULL_RTX
       && GET_CODE (table) == JUMP_INSN
       && (GET_CODE (PATTERN (table)) == ADDR_VEC