diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-25 16:41:30 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-25 16:41:30 +0000 |
commit | ba08b7e7a2cf18445501836205b37aa873f9ca8c (patch) | |
tree | 033e4bf58540b4e1762fda92cd81e4dbf8e56e49 /gcc/unroll.c | |
parent | 632ebc26499392a671de24c8ef55b5528c56181b (diff) | |
download | gcc-ba08b7e7a2cf18445501836205b37aa873f9ca8c.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index f234a81490e..b33fb65e2b4 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(); } } |