diff options
author | Richard Henderson <rth@redhat.com> | 2003-02-15 13:37:22 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-02-15 13:37:22 -0800 |
commit | 9a71ece17f1eabb004fbccf7ec4354a8a6f571c9 (patch) | |
tree | 527f579453d4d1fff1041f381e325811ebbb07f1 /gcc/gcse.c | |
parent | 99dc72775ffa084451dfc05947102ea2f176e25e (diff) | |
download | gcc-9a71ece17f1eabb004fbccf7ec4354a8a6f571c9.zip gcc-9a71ece17f1eabb004fbccf7ec4354a8a6f571c9.tar.gz gcc-9a71ece17f1eabb004fbccf7ec4354a8a6f571c9.tar.bz2 |
gcse.c (bypass_block): Use BLOCK_FOR_INSN for resolving LABEL_REFs.
* gcse.c (bypass_block): Use BLOCK_FOR_INSN for resolving LABEL_REFs.
(bypass_conditional_jumps): Accept computed_jump_p insns as well.
From-SVN: r62945
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -4809,7 +4809,7 @@ bypass_block (bb, setcc, jump) if (new == pc_rtx) dest = FALLTHRU_EDGE (bb)->dest; else if (GET_CODE (new) == LABEL_REF) - dest = BRANCH_EDGE (bb)->dest; + dest = BLOCK_FOR_INSN (XEXP (new, 0)); else dest = NULL; @@ -4848,7 +4848,9 @@ bypass_block (bb, setcc, jump) /* Find basic blocks with more than one predecessor that only contain a single conditional jump. If the result of the comparison is known at compile-time from any incoming edge, redirect that edge to the - appropriate target. Returns nonzero if a change was made. */ + appropriate target. Returns nonzero if a change was made. + + This function is now mis-named, because we also handle indirect jumps. */ static int bypass_conditional_jumps () @@ -4891,7 +4893,8 @@ bypass_conditional_jumps () } else if (GET_CODE (insn) == JUMP_INSN) { - if (any_condjump_p (insn) && onlyjump_p (insn)) + if ((any_condjump_p (insn) || computed_jump_p (insn)) + && onlyjump_p (insn)) changed |= bypass_block (bb, setcc, insn); break; } |