Commit b5e624c6 by Nathan Sidwell Committed by Nathan Sidwell

local-alloc.c (update_equiv_regs): Use gcc_assert, gcc_unreachable.

	* 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.

From-SVN: r97394
parent 71df4441
2005-04-01 Nathan Sidwell <nathan@codesourcery.com> 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
* 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.
* gcov-io.h (GCOV_CHECK, GCOV_CHECK_READING, * gcov-io.h (GCOV_CHECK, GCOV_CHECK_READING,
GCOV_CHECK_WRITING): Remove. GCOV_CHECK_WRITING): Remove.
(gcov_position, gcov_rewrite): Use gcc_assert. (gcov_position, gcov_rewrite): Use gcc_assert.
......
...@@ -1032,9 +1032,8 @@ update_equiv_regs (void) ...@@ -1032,9 +1032,8 @@ update_equiv_regs (void)
once and used once. (If it were only set, but not used, once and used once. (If it were only set, but not used,
flow would have deleted the setting insns.) Hence flow would have deleted the setting insns.) Hence
there can only be one insn in reg_equiv[REGNO].init_insns. */ there can only be one insn in reg_equiv[REGNO].init_insns. */
if (reg_equiv[regno].init_insns == NULL_RTX gcc_assert (reg_equiv[regno].init_insns
|| XEXP (reg_equiv[regno].init_insns, 1) != NULL_RTX) && !XEXP (reg_equiv[regno].init_insns, 1));
abort ();
equiv_insn = XEXP (reg_equiv[regno].init_insns, 0); equiv_insn = XEXP (reg_equiv[regno].init_insns, 0);
/* We may not move instructions that can throw, since /* We may not move instructions that can throw, since
...@@ -1196,8 +1195,10 @@ block_alloc (int b) ...@@ -1196,8 +1195,10 @@ block_alloc (int b)
while (1) while (1)
{ {
if (!NOTE_P (insn)) if (!NOTE_P (insn))
if (++insn_count > max_uid) {
abort (); ++insn_count;
gcc_assert (insn_count <= max_uid);
}
if (insn == BB_HEAD (BASIC_BLOCK (b))) if (insn == BB_HEAD (BASIC_BLOCK (b)))
break; break;
insn = PREV_INSN (insn); insn = PREV_INSN (insn);
...@@ -2117,8 +2118,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno, ...@@ -2117,8 +2118,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
#endif #endif
/* Validate our parameters. */ /* Validate our parameters. */
if (born_index < 0 || born_index > dead_index) gcc_assert (born_index >= 0 && born_index <= dead_index);
abort ();
/* Don't let a pseudo live in a reg across a function call /* Don't let a pseudo live in a reg across a function call
if we might get a nonlocal goto. */ if we might get a nonlocal goto. */
......
...@@ -299,21 +299,17 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, ...@@ -299,21 +299,17 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
{ {
case NE: case NE:
/* Currently only NE tests against zero and one are supported. */ /* Currently only NE tests against zero and one are supported. */
if (XEXP (condition, 1) == const1_rtx) noloop = XEXP (condition, 1);
if (noloop != const0_rtx)
{ {
gcc_assert (noloop == const1_rtx);
increment_count = true; increment_count = true;
noloop = const1_rtx;
} }
else if (XEXP (condition, 1) == const0_rtx)
noloop = const0_rtx;
else
abort ();
break; break;
case GE: case GE:
/* Currently only GE tests against zero are supported. */ /* Currently only GE tests against zero are supported. */
if (XEXP (condition, 1) != const0_rtx) gcc_assert (XEXP (condition, 1) == const0_rtx);
abort ();
noloop = constm1_rtx; noloop = constm1_rtx;
...@@ -330,7 +326,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, ...@@ -330,7 +326,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
/* Abort if an invalid doloop pattern has been generated. */ /* Abort if an invalid doloop pattern has been generated. */
default: default:
abort (); gcc_unreachable ();
} }
if (increment_count) if (increment_count)
......
...@@ -355,8 +355,7 @@ record_use (struct def *def, rtx *use, rtx insn) ...@@ -355,8 +355,7 @@ record_use (struct def *def, rtx *use, rtx insn)
if (GET_CODE (*use) == SUBREG) if (GET_CODE (*use) == SUBREG)
use = &SUBREG_REG (*use); use = &SUBREG_REG (*use);
if (!REG_P (*use)) gcc_assert (REG_P (*use));
abort ();
u->pos = use; u->pos = use;
u->insn = insn; u->insn = insn;
......
...@@ -793,16 +793,15 @@ get_biv_step_1 (rtx insn, rtx reg, ...@@ -793,16 +793,15 @@ get_biv_step_1 (rtx insn, rtx reg,
case SIGN_EXTEND: case SIGN_EXTEND:
case ZERO_EXTEND: case ZERO_EXTEND:
if (GET_MODE (op0) != *inner_mode gcc_assert (GET_MODE (op0) == *inner_mode
|| *extend != UNKNOWN && *extend == UNKNOWN
|| *outer_step != const0_rtx) && *outer_step == const0_rtx);
abort ();
*extend = code; *extend = code;
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return true; return true;
...@@ -826,17 +825,8 @@ get_biv_step (rtx reg, rtx *inner_step, enum machine_mode *inner_mode, ...@@ -826,17 +825,8 @@ get_biv_step (rtx reg, rtx *inner_step, enum machine_mode *inner_mode,
outer_step)) outer_step))
return false; return false;
if (*inner_mode != *outer_mode gcc_assert ((*inner_mode == *outer_mode) != (*extend != UNKNOWN));
&& *extend == UNKNOWN) gcc_assert (*inner_mode != *outer_mode || *outer_step == const0_rtx);
abort ();
if (*inner_mode == *outer_mode
&& *extend != UNKNOWN)
abort ();
if (*inner_mode == *outer_mode
&& *outer_step != const0_rtx)
abort ();
return true; return true;
} }
...@@ -1085,8 +1075,7 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv) ...@@ -1085,8 +1075,7 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv)
mby = XEXP (rhs, 1); mby = XEXP (rhs, 1);
if (!CONSTANT_P (mby)) if (!CONSTANT_P (mby))
{ {
if (!CONSTANT_P (op0)) gcc_assert (CONSTANT_P (op0));
abort ();
tmp = op0; tmp = op0;
op0 = mby; op0 = mby;
mby = tmp; mby = tmp;
...@@ -1094,14 +1083,13 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv) ...@@ -1094,14 +1083,13 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv)
break; break;
case ASHIFT: case ASHIFT:
if (CONSTANT_P (XEXP (rhs, 0))) gcc_assert (!CONSTANT_P (XEXP (rhs, 0)));
abort ();
op0 = XEXP (rhs, 0); op0 = XEXP (rhs, 0);
mby = XEXP (rhs, 1); mby = XEXP (rhs, 1);
break; break;
default: default:
abort (); gcc_unreachable ();
} }
amode = GET_MODE (rhs); amode = GET_MODE (rhs);
...@@ -1210,8 +1198,7 @@ get_iv_value (struct rtx_iv *iv, rtx iteration) ...@@ -1210,8 +1198,7 @@ get_iv_value (struct rtx_iv *iv, rtx iteration)
/* We would need to generate some if_then_else patterns, and so far /* We would need to generate some if_then_else patterns, and so far
it is not needed anywhere. */ it is not needed anywhere. */
if (iv->first_special) gcc_assert (!iv->first_special);
abort ();
if (iv->step != const0_rtx && iteration != const0_rtx) if (iv->step != const0_rtx && iteration != const0_rtx)
val = simplify_gen_binary (PLUS, iv->extend_mode, iv->base, val = simplify_gen_binary (PLUS, iv->extend_mode, iv->base,
...@@ -1547,8 +1534,7 @@ canon_condition (rtx cond) ...@@ -1547,8 +1534,7 @@ canon_condition (rtx cond)
mode = GET_MODE (op0); mode = GET_MODE (op0);
if (mode == VOIDmode) if (mode == VOIDmode)
mode = GET_MODE (op1); mode = GET_MODE (op1);
if (mode == VOIDmode) gcc_assert (mode != VOIDmode);
abort ();
if (GET_CODE (op1) == CONST_INT if (GET_CODE (op1) == CONST_INT
&& GET_MODE_CLASS (mode) != MODE_CC && GET_MODE_CLASS (mode) != MODE_CC
...@@ -1677,20 +1663,23 @@ simplify_using_condition (rtx cond, rtx *expr, regset altered) ...@@ -1677,20 +1663,23 @@ simplify_using_condition (rtx cond, rtx *expr, regset altered)
static void static void
eliminate_implied_condition (enum rtx_code op, rtx a, rtx *b) eliminate_implied_condition (enum rtx_code op, rtx a, rtx *b)
{ {
if (op == AND) switch (op)
{ {
case AND:
/* If A implies *B, we may replace *B by true. */ /* If A implies *B, we may replace *B by true. */
if (implies_p (a, *b)) if (implies_p (a, *b))
*b = const_true_rtx; *b = const_true_rtx;
} break;
else if (op == IOR)
{ case IOR:
/* If *B implies A, we may replace *B by false. */ /* If *B implies A, we may replace *B by false. */
if (implies_p (*b, a)) if (implies_p (*b, a))
*b = const0_rtx; *b = const0_rtx;
break;
default:
gcc_unreachable ();
} }
else
abort ();
} }
/* Eliminates the conditions in TAIL that are implied by HEAD. OP is the /* Eliminates the conditions in TAIL that are implied by HEAD. OP is the
...@@ -1731,19 +1720,22 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr) ...@@ -1731,19 +1720,22 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
eliminate_implied_conditions (op, &head, tail); eliminate_implied_conditions (op, &head, tail);
if (op == AND) switch (op)
{ {
case AND:
neutral = const_true_rtx; neutral = const_true_rtx;
aggr = const0_rtx; aggr = const0_rtx;
} break;
else if (op == IOR)
{ case IOR:
neutral = const0_rtx; neutral = const0_rtx;
aggr = const_true_rtx; aggr = const_true_rtx;
} break;
else
abort ();
default:
gcc_unreachable ();
}
simplify_using_initial_values (loop, UNKNOWN, &head); simplify_using_initial_values (loop, UNKNOWN, &head);
if (head == aggr) if (head == aggr)
{ {
...@@ -1770,8 +1762,7 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr) ...@@ -1770,8 +1762,7 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
return; return;
} }
if (op != UNKNOWN) gcc_assert (op == UNKNOWN);
abort ();
e = loop_preheader_edge (loop); e = loop_preheader_edge (loop);
if (e->src == ENTRY_BLOCK_PTR) if (e->src == ENTRY_BLOCK_PTR)
...@@ -1873,7 +1864,7 @@ shorten_into_mode (struct rtx_iv *iv, enum machine_mode mode, ...@@ -1873,7 +1864,7 @@ shorten_into_mode (struct rtx_iv *iv, enum machine_mode mode,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
iv->mode = mode; iv->mode = mode;
...@@ -1931,7 +1922,7 @@ canonicalize_iv_subregs (struct rtx_iv *iv0, struct rtx_iv *iv1, ...@@ -1931,7 +1922,7 @@ canonicalize_iv_subregs (struct rtx_iv *iv0, struct rtx_iv *iv1,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
/* Values of both variables should be computed in the same mode. These /* Values of both variables should be computed in the same mode. These
...@@ -2031,15 +2022,13 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition, ...@@ -2031,15 +2022,13 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
desc->niter_max = 0; desc->niter_max = 0;
cond = GET_CODE (condition); cond = GET_CODE (condition);
if (!COMPARISON_P (condition)) gcc_assert (COMPARISON_P (condition));
abort ();
mode = GET_MODE (XEXP (condition, 0)); mode = GET_MODE (XEXP (condition, 0));
if (mode == VOIDmode) if (mode == VOIDmode)
mode = GET_MODE (XEXP (condition, 1)); mode = GET_MODE (XEXP (condition, 1));
/* The constant comparisons should be folded. */ /* The constant comparisons should be folded. */
if (mode == VOIDmode) gcc_assert (mode != VOIDmode);
abort ();
/* We only handle integers or pointers. */ /* We only handle integers or pointers. */
if (GET_MODE_CLASS (mode) != MODE_INT if (GET_MODE_CLASS (mode) != MODE_INT
......
...@@ -1891,8 +1891,7 @@ expand_var_during_unrolling (struct var_to_expand *ve, rtx insn) ...@@ -1891,8 +1891,7 @@ expand_var_during_unrolling (struct var_to_expand *ve, rtx insn)
bool really_new_expansion = false; bool really_new_expansion = false;
set = single_set (insn); set = single_set (insn);
if (!set) gcc_assert (set);
abort ();
/* Generate a new register only if the expansion limit has not been /* Generate a new register only if the expansion limit has not been
reached. Else reuse an already existing expansion. */ reached. Else reuse an already existing expansion. */
......
...@@ -104,13 +104,11 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob, ...@@ -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 /* A hack -- there seems to be no easy generic way how to make a
conditional jump from a ccmode comparison. */ conditional jump from a ccmode comparison. */
if (!cinsn) gcc_assert (cinsn);
abort ();
cond = XEXP (SET_SRC (pc_set (cinsn)), 0); cond = XEXP (SET_SRC (pc_set (cinsn)), 0);
if (GET_CODE (cond) != comp gcc_assert (GET_CODE (cond) == comp);
|| !rtx_equal_p (op0, XEXP (cond, 0)) gcc_assert (rtx_equal_p (op0, XEXP (cond, 0)));
|| !rtx_equal_p (op1, XEXP (cond, 1))) gcc_assert (rtx_equal_p (op1, XEXP (cond, 1)));
abort ();
emit_jump_insn (copy_insn (PATTERN (cinsn))); emit_jump_insn (copy_insn (PATTERN (cinsn)));
jump = get_last_insn (); jump = get_last_insn ();
JUMP_LABEL (jump) = JUMP_LABEL (cinsn); 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, ...@@ -119,8 +117,7 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob,
} }
else else
{ {
if (cinsn) gcc_assert (!cinsn);
abort ();
op0 = force_operand (op0, NULL_RTX); op0 = force_operand (op0, NULL_RTX);
op1 = force_operand (op1, NULL_RTX); op1 = force_operand (op1, NULL_RTX);
...@@ -380,8 +377,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop, ...@@ -380,8 +377,7 @@ unswitch_single_loop (struct loops *loops, struct loop *loop,
/* Unswitch the loop on this condition. */ /* Unswitch the loop on this condition. */
nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn); nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn);
if (!nloop) gcc_assert (nloop);
abort ();
/* Invoke itself on modified loops. */ /* Invoke itself on modified loops. */
unswitch_single_loop (loops, nloop, rconds, num + 1); unswitch_single_loop (loops, nloop, rconds, num + 1);
...@@ -413,18 +409,12 @@ unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on, ...@@ -413,18 +409,12 @@ unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on,
rtx seq; rtx seq;
/* Some sanity checking. */ /* Some sanity checking. */
if (!flow_bb_inside_loop_p (loop, unswitch_on)) gcc_assert (flow_bb_inside_loop_p (loop, unswitch_on));
abort (); gcc_assert (EDGE_COUNT (unswitch_on->succs) == 2);
if (EDGE_COUNT (unswitch_on->succs) != 2) gcc_assert (just_once_each_iteration_p (loop, unswitch_on));
abort (); gcc_assert (!loop->inner);
if (!just_once_each_iteration_p (loop, unswitch_on)) gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 0)->dest));
abort (); gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 1)->dest));
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 ();
entry = loop_preheader_edge (loop); entry = loop_preheader_edge (loop);
......
...@@ -83,8 +83,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -83,8 +83,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
of an insn added during loop, since these don't have LUIDs. */ of an insn added during loop, since these don't have LUIDs. */
#define INSN_LUID(INSN) \ #define INSN_LUID(INSN) \
(INSN_UID (INSN) < max_uid_for_loop ? uid_luid[INSN_UID (INSN)] \ (gcc_assert (INSN_UID (INSN) < max_uid_for_loop), uid_luid[INSN_UID (INSN)])
: (abort (), -1))
#define REGNO_FIRST_LUID(REGNO) \ #define REGNO_FIRST_LUID(REGNO) \
(REGNO_FIRST_UID (REGNO) < max_uid_for_loop \ (REGNO_FIRST_UID (REGNO) < max_uid_for_loop \
...@@ -869,8 +868,7 @@ loop_optimize (rtx f, FILE *dumpfile, int flags) ...@@ -869,8 +868,7 @@ loop_optimize (rtx f, FILE *dumpfile, int flags)
/* See if we went too far. Note that get_max_uid already returns /* See if we went too far. Note that get_max_uid already returns
one more that the maximum uid of all insn. */ one more that the maximum uid of all insn. */
if (get_max_uid () > max_uid_for_loop) gcc_assert (get_max_uid () <= max_uid_for_loop);
abort ();
/* Now reset it to the actual size we need. See above. */ /* Now reset it to the actual size we need. See above. */
max_uid_for_loop = get_max_uid (); max_uid_for_loop = get_max_uid ();
...@@ -2117,7 +2115,7 @@ rtx_equal_for_loop_p (rtx x, rtx y, struct loop_movables *movables, ...@@ -2117,7 +2115,7 @@ rtx_equal_for_loop_p (rtx x, rtx y, struct loop_movables *movables,
contain anything but integers and other rtx's, contain anything but integers and other rtx's,
except for within LABEL_REFs and SYMBOL_REFs. */ except for within LABEL_REFs and SYMBOL_REFs. */
default: default:
abort (); gcc_unreachable ();
} }
} }
return 1; return 1;
...@@ -2310,21 +2308,26 @@ move_movables (struct loop *loop, struct loop_movables *movables, ...@@ -2310,21 +2308,26 @@ move_movables (struct loop *loop, struct loop_movables *movables,
for (count = m->consec; count >= 0; count--) for (count = m->consec; count >= 0; count--)
{ {
/* If this is the first insn of a library call sequence, if (!NOTE_P (p))
something is very wrong. */
if (!NOTE_P (p)
&& (temp = find_reg_note (p, REG_LIBCALL, NULL_RTX)))
abort ();
/* If this is the last insn of a libcall sequence, then
delete every insn in the sequence except the last.
The last insn is handled in the normal manner. */
if (!NOTE_P (p)
&& (temp = find_reg_note (p, REG_RETVAL, NULL_RTX)))
{ {
temp = XEXP (temp, 0); /* If this is the first insn of a library
while (temp != p) call sequence, something is very
temp = delete_insn (temp); wrong. */
gcc_assert (!find_reg_note
(p, REG_LIBCALL, NULL_RTX));
/* If this is the last insn of a libcall
sequence, then delete every insn in the
sequence except the last. The last insn
is handled in the normal manner. */
temp = find_reg_note (p, REG_RETVAL, NULL_RTX);
if (temp)
{
temp = XEXP (temp, 0);
while (temp != p)
temp = delete_insn (temp);
}
} }
temp = p; temp = p;
...@@ -2488,8 +2491,7 @@ move_movables (struct loop *loop, struct loop_movables *movables, ...@@ -2488,8 +2491,7 @@ move_movables (struct loop *loop, struct loop_movables *movables,
<< GET_MODE_BITSIZE (m->savemode))) << GET_MODE_BITSIZE (m->savemode)))
- 1), - 1),
reg, 1, OPTAB_LIB_WIDEN); reg, 1, OPTAB_LIB_WIDEN);
if (tem == 0) gcc_assert (tem);
abort ();
if (tem != reg) if (tem != reg)
emit_move_insn (reg, tem); emit_move_insn (reg, tem);
sequence = get_insns (); sequence = get_insns ();
...@@ -2777,8 +2779,7 @@ replace_call_address (rtx x, rtx reg, rtx addr) ...@@ -2777,8 +2779,7 @@ replace_call_address (rtx x, rtx reg, rtx addr)
case MEM: case MEM:
/* If this MEM uses a reg other than the one we expected, /* If this MEM uses a reg other than the one we expected,
something is wrong. */ something is wrong. */
if (XEXP (x, 0) != reg) gcc_assert (XEXP (x, 0) == reg);
abort ();
XEXP (x, 0) = addr; XEXP (x, 0) = addr;
return; return;
...@@ -3091,8 +3092,7 @@ find_and_verify_loops (rtx f, struct loops *loops) ...@@ -3091,8 +3092,7 @@ find_and_verify_loops (rtx f, struct loops *loops)
break; break;
case NOTE_INSN_LOOP_END: case NOTE_INSN_LOOP_END:
if (! current_loop) gcc_assert (current_loop);
abort ();
current_loop->end = insn; current_loop->end = insn;
current_loop = current_loop->outer; current_loop = current_loop->outer;
...@@ -3340,8 +3340,7 @@ find_and_verify_loops (rtx f, struct loops *loops) ...@@ -3340,8 +3340,7 @@ find_and_verify_loops (rtx f, struct loops *loops)
/* If we didn't find it, then something is /* If we didn't find it, then something is
wrong. */ wrong. */
if (! r) gcc_assert (r);
abort ();
} }
/* P is now a jump outside the loop, so it must be put /* P is now a jump outside the loop, so it must be put
...@@ -4038,7 +4037,7 @@ rtx_equal_for_prefetch_p (rtx x, rtx y) ...@@ -4038,7 +4037,7 @@ rtx_equal_for_prefetch_p (rtx x, rtx y)
contain anything but integers and other rtx's, contain anything but integers and other rtx's,
except for within LABEL_REFs and SYMBOL_REFs. */ except for within LABEL_REFs and SYMBOL_REFs. */
default: default:
abort (); gcc_unreachable ();
} }
} }
return 1; return 1;
...@@ -4964,10 +4963,9 @@ fold_rtx_mult_add (rtx mult1, rtx mult2, rtx add1, enum machine_mode mode) ...@@ -4964,10 +4963,9 @@ fold_rtx_mult_add (rtx mult1, rtx mult2, rtx add1, enum machine_mode mode)
/* The modes must all be the same. This should always be true. For now, /* The modes must all be the same. This should always be true. For now,
check to make sure. */ check to make sure. */
if ((GET_MODE (mult1) != mode && GET_MODE (mult1) != VOIDmode) gcc_assert (GET_MODE (mult1) == mode || GET_MODE (mult1) == VOIDmode);
|| (GET_MODE (mult2) != mode && GET_MODE (mult2) != VOIDmode) gcc_assert (GET_MODE (mult2) == mode || GET_MODE (mult2) == VOIDmode);
|| (GET_MODE (add1) != mode && GET_MODE (add1) != VOIDmode)) gcc_assert (GET_MODE (add1) == mode || GET_MODE (add1) == VOIDmode);
abort ();
/* Ensure that if at least one of mult1/mult2 are constant, then mult2 /* Ensure that if at least one of mult1/mult2 are constant, then mult2
will be a constant. */ will be a constant. */
...@@ -5802,9 +5800,8 @@ loop_iterations (struct loop *loop) ...@@ -5802,9 +5800,8 @@ loop_iterations (struct loop *loop)
will propagate a new pseudo into the old iteration register but will propagate a new pseudo into the old iteration register but
this will be marked by having the REG_USERVAR_P bit set. */ this will be marked by having the REG_USERVAR_P bit set. */
if ((unsigned) REGNO (iteration_var) >= ivs->n_regs gcc_assert ((unsigned) REGNO (iteration_var) < ivs->n_regs
&& ! REG_USERVAR_P (iteration_var)) || REG_USERVAR_P (iteration_var));
abort ();
/* Determine the initial value of the iteration variable, and the amount /* Determine the initial value of the iteration variable, and the amount
that it is incremented each loop. Use the tables constructed by that it is incremented each loop. Use the tables constructed by
...@@ -5861,8 +5858,7 @@ loop_iterations (struct loop *loop) ...@@ -5861,8 +5858,7 @@ loop_iterations (struct loop *loop)
if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == BASIC_INDUCT) if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == BASIC_INDUCT)
{ {
if (REGNO (iteration_var) >= ivs->n_regs) gcc_assert (REGNO (iteration_var) < ivs->n_regs);
abort ();
/* Grab initial value, only useful if it is a constant. */ /* Grab initial value, only useful if it is a constant. */
bl = REG_IV_CLASS (ivs, REGNO (iteration_var)); bl = REG_IV_CLASS (ivs, REGNO (iteration_var));
...@@ -5883,8 +5879,7 @@ loop_iterations (struct loop *loop) ...@@ -5883,8 +5879,7 @@ loop_iterations (struct loop *loop)
struct induction *v = REG_IV_INFO (ivs, REGNO (iteration_var)); struct induction *v = REG_IV_INFO (ivs, REGNO (iteration_var));
rtx biv_initial_value; rtx biv_initial_value;
if (REGNO (v->src_reg) >= ivs->n_regs) gcc_assert (REGNO (v->src_reg) < ivs->n_regs);
abort ();
if (!v->always_executed || v->maybe_multiple) if (!v->always_executed || v->maybe_multiple)
{ {
...@@ -5991,7 +5986,7 @@ loop_iterations (struct loop *loop) ...@@ -5991,7 +5986,7 @@ loop_iterations (struct loop *loop)
compare_dir = 0; compare_dir = 0;
break; break;
default: default:
abort (); gcc_unreachable ();
} }
/* If the comparison value is an invariant register, then try to find /* If the comparison value is an invariant register, then try to find
...@@ -6243,18 +6238,17 @@ loop_iterations (struct loop *loop) ...@@ -6243,18 +6238,17 @@ loop_iterations (struct loop *loop)
unsigned, because they can be as large as 2^n - 1. */ unsigned, because they can be as large as 2^n - 1. */
inc = INTVAL (increment); inc = INTVAL (increment);
gcc_assert (inc);
if (inc > 0) if (inc > 0)
{ {
abs_diff = INTVAL (final_value) - INTVAL (initial_value); abs_diff = INTVAL (final_value) - INTVAL (initial_value);
abs_inc = inc; abs_inc = inc;
} }
else if (inc < 0) else
{ {
abs_diff = INTVAL (initial_value) - INTVAL (final_value); abs_diff = INTVAL (initial_value) - INTVAL (final_value);
abs_inc = -inc; abs_inc = -inc;
} }
else
abort ();
/* Given that iteration_var is going to iterate over its own mode, /* Given that iteration_var is going to iterate over its own mode,
not HOST_WIDE_INT, disregard higher bits that might have come not HOST_WIDE_INT, disregard higher bits that might have come
...@@ -6964,19 +6958,15 @@ record_giv (const struct loop *loop, struct induction *v, rtx insn, ...@@ -6964,19 +6958,15 @@ record_giv (const struct loop *loop, struct induction *v, rtx insn,
/* Add the giv to the class of givs computed from one biv. */ /* Add the giv to the class of givs computed from one biv. */
bl = REG_IV_CLASS (ivs, REGNO (src_reg)); bl = REG_IV_CLASS (ivs, REGNO (src_reg));
if (bl) gcc_assert (bl);
{ v->next_iv = bl->giv;
v->next_iv = bl->giv; bl->giv = v;
bl->giv = v;
/* Don't count DEST_ADDR. This is supposed to count the number of /* Don't count DEST_ADDR. This is supposed to count the number of
insns that calculate givs. */ insns that calculate givs. */
if (type == DEST_REG) if (type == DEST_REG)
bl->giv_count++; bl->giv_count++;
bl->total_benefit += benefit; bl->total_benefit += benefit;
}
else
/* Fatal error, biv missing for this giv? */
abort ();
if (type == DEST_ADDR) if (type == DEST_ADDR)
{ {
...@@ -7191,8 +7181,7 @@ final_giv_value (const struct loop *loop, struct induction *v) ...@@ -7191,8 +7181,7 @@ final_giv_value (const struct loop *loop, struct induction *v)
} }
/* Replaceable giv's should never reach here. */ /* Replaceable giv's should never reach here. */
if (v->replaceable) gcc_assert (!v->replaceable);
abort ();
/* Check to see if the biv is dead at all loop exits. */ /* Check to see if the biv is dead at all loop exits. */
if (reg_dead_after_loop (loop, v->dest_reg)) if (reg_dead_after_loop (loop, v->dest_reg))
...@@ -7756,7 +7745,7 @@ general_induction_var (const struct loop *loop, rtx x, rtx *src_reg, ...@@ -7756,7 +7745,7 @@ general_induction_var (const struct loop *loop, rtx x, rtx *src_reg,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
/* Remove any enclosing USE from ADD_VAL and MULT_VAL (there will be /* Remove any enclosing USE from ADD_VAL and MULT_VAL (there will be
...@@ -7875,7 +7864,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit) ...@@ -7875,7 +7864,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit)
ext_val, benefit); ext_val, benefit);
default: default:
abort (); gcc_unreachable ();
} }
/* Each argument must be either REG, PLUS, or MULT. Convert REG to /* Each argument must be either REG, PLUS, or MULT. Convert REG to
...@@ -8016,7 +8005,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit) ...@@ -8016,7 +8005,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit)
ext_val, benefit); ext_val, benefit);
default: default:
abort (); gcc_unreachable ();
} }
case ASHIFT: case ASHIFT:
...@@ -8775,7 +8764,7 @@ extension_within_bounds_p (const struct loop *loop, struct iv_class *bl, ...@@ -8775,7 +8764,7 @@ extension_within_bounds_p (const struct loop *loop, struct iv_class *bl,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return ((!signedp || biv_fits_mode_p (loop, bl, incr, mode, false)) return ((!signedp || biv_fits_mode_p (loop, bl, incr, mode, false))
...@@ -11112,8 +11101,7 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno) ...@@ -11112,8 +11101,7 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno)
&& REG_P (SET_DEST (set)) && REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) == regno) && REGNO (SET_DEST (set)) == regno)
{ {
if (init_insn) gcc_assert (!init_insn);
abort ();
init_insn = insn; init_insn = insn;
if (REGNO_FIRST_UID (regno) == INSN_UID (insn)) if (REGNO_FIRST_UID (regno) == INSN_UID (insn))
...@@ -11146,8 +11134,7 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno) ...@@ -11146,8 +11134,7 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno)
} }
} }
} }
if (! init_insn) gcc_assert (init_insn);
abort ();
if (apply_change_group ()) if (apply_change_group ())
{ {
if (loop_dump_stream) if (loop_dump_stream)
...@@ -11648,7 +11635,7 @@ loop_giv_dump (const struct induction *v, FILE *file, int verbose) ...@@ -11648,7 +11635,7 @@ loop_giv_dump (const struct induction *v, FILE *file, int verbose)
fprintf (file, " ext tr"); fprintf (file, " ext tr");
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
......
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