aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-03-23 12:40:26 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-03-23 12:40:26 -0800
commitef3e98869075132505d8e1e1c9deaa5fee42e0eb (patch)
treed834a7d0bea7c7fed3f67f846807bb85f2f13986 /gcc
parentac514408f66cb2642835ac5be802dd181a076ac3 (diff)
downloadgcc-ef3e98869075132505d8e1e1c9deaa5fee42e0eb.zip
gcc-ef3e98869075132505d8e1e1c9deaa5fee42e0eb.tar.gz
gcc-ef3e98869075132505d8e1e1c9deaa5fee42e0eb.tar.bz2
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: r64754
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cfgcleanup.c4
-rw-r--r--gcc/cfgrtl.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 65799f5..f98fa02 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
* ifcvt.c (find_if_block): Disallow tablejump insns outgoing
from then_bb or else_bb after flow2.
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 42dc0a9..23436d5 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -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;
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 31f7110..01b7e92 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -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