From: Richard Henderson Date: Sun, 23 Mar 2003 20:41:22 +0000 (-0800) Subject: cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2. X-Git-Tag: releases/gcc-3.2.3~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=643f5d28733ee9f299c281329f153037685d7f37;p=thirdparty%2Fgcc.git cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2. * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2. * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. From-SVN: r64756 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4999c014e4d..8002e2b3a06e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-23 Richard Henderson + + * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps + before flow2. + * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. + 2003-03-23 Richard Henderson PR opt/10116 diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 4cadfe81cdc2..43c48855ff05 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index e2cb773379a1..38158ccc7737 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -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