Commit 742dff15 by Jan Hubicka Committed by Richard Henderson

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
parent d1ee23e5
2000-05-25 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.
2000-05-25 Richard Henderson <rth@cygnus.com>
* stmt.c (expand_end_bindings): Fix thinko last change.
2000-05-25 Andrew MacLeod <amacleod@cygnus.com>
Andrew Haley <aph@cygnus.com>
Andrew Haley <aph@cygnus.com>
* except.c (func_eh_entry): Add emitted field.
(new_eh_region_entry): Set emitted field to 0;
......@@ -143,12 +160,12 @@ Thu May 25 02:19:27 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* Back out this patch:
Tue Dec 7 19:22:06 1999 Richard Henderson <rth@cygnus.com>
* loop.h (struct induction): Add multi_insn_incr.
* loop.c (basic_induction_var): New multi_insn_incr argument.
Set it if we search back through previous insns for the biv.
(record_biv): New multi_insn_incr argument; fill in struct induction.
(strength_reduce): Discard an iv with multiple bivs, any of
which require multiple insns to increment.
* loop.h (struct induction): Add multi_insn_incr.
* loop.c (basic_induction_var): New multi_insn_incr argument.
Set it if we search back through previous insns for the biv.
(record_biv): New multi_insn_incr argument; fill in struct induction.
(strength_reduce): Discard an iv with multiple bivs, any of
which require multiple insns to increment.
* loop.c (check_insn_for_bivs): Remove bits copied from above patch.
......@@ -1532,9 +1532,7 @@ extern void jump_optimize PARAMS ((rtx, int, int, int));
extern void jump_optimize_minimal PARAMS ((rtx));
extern void rebuild_jump_labels PARAMS ((rtx));
extern void thread_jumps PARAMS ((rtx, int, int));
extern int redirect_exp PARAMS ((rtx *, rtx, rtx, rtx));
extern int rtx_equal_for_thread_p PARAMS ((rtx, rtx, rtx));
extern int invert_exp PARAMS ((rtx, rtx));
extern int can_reverse_comparison_p PARAMS ((rtx, rtx));
extern void delete_for_peephole PARAMS ((rtx, rtx));
extern int condjump_in_parallel_p PARAMS ((rtx));
......
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment