diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-01 14:17:36 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-01 14:17:36 +0000 |
commit | 972e95afaffecaf703dd98d0a45abe625c47e375 (patch) | |
tree | 2faae66acc9a81f1dddcb31724e669a2eb325a04 /gcc/loop-unswitch.c | |
parent | 1cc52d6f68fd0db944af690639ba7a53956a4ac3 (diff) | |
download | gcc-972e95afaffecaf703dd98d0a45abe625c47e375.tar.gz |
* local-alloc.c (update_equiv_regs): Use gcc_assert, gcc_unreachable.
(block_alloc, find_free_reg): Likewise.
* loop-doloop.c (doloop_modify): Likewise.
* loop-invariant.c (record_use): Likewise.
* loop-iv.c (get_biv_step_1, get_biv_step, iv_analyze,
get_iv_value, canon_condition, eliminate_implied_condition,
eliminate_implied_condition, simplify_using_initial_values,
shorten_into_mode, canonicalize_iv_subregs,
iv_number_of_iterations): Likewise.
* loop-unroll.c (expand_var_during_unrolling): Likewise.
* loop-unswitch.c (compare_and_jump_seq, unswitch_single_loop,
unswitch_loop): Likewise.
* loop.c (INSN_LUID, loop_optimize, rtx_equal_for_loop_p,
move_movables, replace_call_address, find_and_verify_loops,
rtx_equal_for_prefetch_p, fold_rtx_mult_add, loop_iterations,
record_giv, final_giv_value, general_induction_var,
simplify_giv_expr, extension_within_bounds_p, try_copy_prop,
loop_giv_dump): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-unswitch.c')
-rw-r--r-- | gcc/loop-unswitch.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index bb014bde465..96d80c39477 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -104,13 +104,11 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob, { /* A hack -- there seems to be no easy generic way how to make a conditional jump from a ccmode comparison. */ - if (!cinsn) - abort (); + gcc_assert (cinsn); cond = XEXP (SET_SRC (pc_set (cinsn)), 0); - if (GET_CODE (cond) != comp - || !rtx_equal_p (op0, XEXP (cond, 0)) - || !rtx_equal_p (op1, XEXP (cond, 1))) - abort (); + gcc_assert (GET_CODE (cond) == comp); + gcc_assert (rtx_equal_p (op0, XEXP (cond, 0))); + gcc_assert (rtx_equal_p (op1, XEXP (cond, 1))); emit_jump_insn (copy_insn (PATTERN (cinsn))); jump = get_last_insn (); JUMP_LABEL (jump) = JUMP_LABEL (cinsn); @@ -119,8 +117,7 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob, } else { - if (cinsn) - abort (); + gcc_assert (!cinsn); op0 = force_operand (op0, NULL_RTX); op1 = force_operand (op1, NULL_RTX); @@ -380,8 +377,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop, /* Unswitch the loop on this condition. */ nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn); - if (!nloop) - abort (); + gcc_assert (nloop); /* Invoke itself on modified loops. */ unswitch_single_loop (loops, nloop, rconds, num + 1); @@ -413,18 +409,12 @@ unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on, rtx seq; /* Some sanity checking. */ - if (!flow_bb_inside_loop_p (loop, unswitch_on)) - abort (); - if (EDGE_COUNT (unswitch_on->succs) != 2) - abort (); - if (!just_once_each_iteration_p (loop, unswitch_on)) - abort (); - if (loop->inner) - abort (); - if (!flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 0)->dest)) - abort (); - if (!flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 1)->dest)) - abort (); + gcc_assert (flow_bb_inside_loop_p (loop, unswitch_on)); + gcc_assert (EDGE_COUNT (unswitch_on->succs) == 2); + gcc_assert (just_once_each_iteration_p (loop, unswitch_on)); + gcc_assert (!loop->inner); + gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 0)->dest)); + gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 1)->dest)); entry = loop_preheader_edge (loop); |