aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-05-25 09:41:30 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-25 09:41:30 -0700
commit742dff159687a0713938506aafe7ea1fdefcdab2 (patch)
tree033e4bf58540b4e1762fda92cd81e4dbf8e56e49 /gcc/unroll.c
parentd1ee23e5c3d22613ea7a5c2807b7f12045bd6883 (diff)
downloadgcc-742dff159687a0713938506aafe7ea1fdefcdab2.zip
gcc-742dff159687a0713938506aafe7ea1fdefcdab2.tar.gz
gcc-742dff159687a0713938506aafe7ea1fdefcdab2.tar.bz2
Jan Hubicka <jh@suse.cz>
* jump.c (invert_exp_1): Remove first argument, use pc_set to get the expression. (redirect_exp): Make static; redirect only the pc_set expression, remove first argument. (invert_exp): Remove first argument, make static. (jump_optimize): Use any_condjump_p, any_uncondjump_p and any_onlyjump at most places where we originaly did condjump_p and simplejump_p. (jump_back_p, follow_jumps, thread_jumps): Likewise. (delete_barrier_succesors): Use pc_set. (invert_jump_1, invert_jump, redirect_jump_1, redirect_jump): Update calls of invert_exp and redirect_exp. * rtl.h (redirect_exp, invert_exp): Remove. * unroll.c (copy_loop_body): Use invert_jump and redirect_jump. From-SVN: r34171
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index f234a81..b33fb65 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -2037,22 +2037,17 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
if (JUMP_LABEL (insn) == start_label && insn == copy_end
&& ! last_iteration)
{
+ /* Update JUMP_LABEL correctly to make invert_jump working. */
+ JUMP_LABEL (copy) = get_label_from_map (map,
+ CODE_LABEL_NUMBER
+ (JUMP_LABEL (insn)));
/* This is a branch to the beginning of the loop; this is the
last insn being copied; and this is not the last iteration.
In this case, we want to change the original fall through
case to be a branch past the end of the loop, and the
original jump label case to fall_through. */
- if (invert_exp (pattern, copy))
- {
- if (! redirect_exp (&pattern,
- get_label_from_map (map,
- CODE_LABEL_NUMBER
- (JUMP_LABEL (insn))),
- exit_label, copy))
- abort ();
- }
- else
+ if (!invert_jump (copy, exit_label, 0))
{
rtx jmp;
rtx lab = gen_label_rtx ();
@@ -2064,12 +2059,8 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
jmp = emit_barrier_after (jmp);
emit_label_after (lab, jmp);
LABEL_NUSES (lab) = 0;
- if (! redirect_exp (&pattern,
- get_label_from_map (map,
- CODE_LABEL_NUMBER
- (JUMP_LABEL (insn))),
- lab, copy))
- abort ();
+ if (!redirect_jump (copy, lab, 0))
+ abort();
}
}