]> 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:41:22 +0000 (12:41 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 23 Mar 2003 20:41:22 +0000 (12:41 -0800)
        * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps
        before flow2.
        * cfgrtl.c (try_redirect_by_replacing_jump): Similarly.

From-SVN: r64756

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

index d4999c014e4d046197aa6610785da7042ccafb82..8002e2b3a06e237fd6ab7de966bc657c5cf50250 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 4cadfe81cdc28be79a8658500ee0a6e735e2ad24..43c48855ff0525ffffe3330c9af9bc880c1cdd5f 100644 (file)
@@ -1640,8 +1640,9 @@ try_optimize_cfg (mode)
                     /* If the jump insn has side effects,
                        we can't kill the edge.  */
                     && (GET_CODE (b->end) != JUMP_INSN
-                        || (onlyjump_p (b->end)
-                            && !tablejump_p (b->end)))
+                        || (flow2_completed
+                            ? simplejump_p (b->end)
+                            : onlyjump_p (b->end)))
                     && merge_blocks (s, b, c, mode))
                changed_here = true;
 
index e2cb773379a1c9c9b5e14cc4f6b40ee7b236b455..38158ccc773785a7dbb9abb077f6a7a92239abd3 100644 (file)
@@ -675,7 +675,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