From 742dff159687a0713938506aafe7ea1fdefcdab2 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 25 May 2000 09:41:30 -0700 Subject: Jan Hubicka * 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 --- gcc/unroll.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'gcc/unroll.c') 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(); } } -- cgit v1.1