diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-04-22 16:14:55 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-04-22 16:14:55 +0000 |
commit | 535a42b11612ee3e398190114253e83e0e185b5b (patch) | |
tree | 13c3694fe0b9c65ce670df40813f4df53f79e80d /gcc/haifa-sched.c | |
parent | 98c41d988c9db08ecdfb4d00b672b9e1a96031e8 (diff) | |
download | gcc-535a42b11612ee3e398190114253e83e0e185b5b.zip gcc-535a42b11612ee3e398190114253e83e0e185b5b.tar.gz gcc-535a42b11612ee3e398190114253e83e0e185b5b.tar.bz2 |
builtins.c (gimplify_va_arg_expr): Reword comments to avoid 'abort'.
* builtins.c (gimplify_va_arg_expr): Reword comments to avoid
'abort'. Use gcc_assert and gcc_unreachable as appropriate.
* c-format.c (get_constant, decode_format_attr, get_flag_spec,
find_char_info_specifier_index,
find_length_info_modifier_index): Likewise.
* c-typeck.c (composite_type, pop_init_level): Likewise.
* combine.c (cant_combine_insn_p, try_combine): Likewise.
* cse.c (cse_insn): Likewise
* dominance.c (calc_dfs_tree): Likewise
dwarf2out.c (loc_descriptor_from_tree_1,
add_abstract_origin_attribute, force_decl_die,
force_type_die): Likewise
emit-rtl.c (operand_subword_force): Likewise
explow.c (hard_function_value): Likewise
expmed.c (store_bit_field, expand_divmod,
emit_store_flag_force): Likewise
expr.c (emit_move_multi_word, store_expr,
expand_expr_real_1): Likewise
final.c (this_is_asm_operands, shorten_branches, final_scan_insn,
output_operand): Likewise
flow.c (recompute_reg_usage): Likewise
* function.c (assign_stack_temp_for_type, assign_temp,
handle_epilogue_set): Likewise
* genextract.c (main): Likewise
* gimplify.c (mostly_copy_tree_r, gimplify_return_expr,
gimplify_modify_expr_rhs, gimplify_expr): Likewise
* haifa-sched.c (ready_lastpos, ready_remove_first, ready_element,
ready_remove, rm_line_notes, rm_other_notes,
schedule_block): Likewise
mips-tfile.c (copy_object, out_of_bounds): Likewise
From-SVN: r98567
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 6a2ac54..bb8a917 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -753,8 +753,7 @@ queue_insn (rtx insn, int n_cycles) HAIFA_INLINE static rtx * ready_lastpos (struct ready_list *ready) { - if (ready->n_ready == 0) - abort (); + gcc_assert (ready->n_ready); return ready->vec + ready->first - ready->n_ready + 1; } @@ -782,8 +781,8 @@ HAIFA_INLINE static rtx ready_remove_first (struct ready_list *ready) { rtx t; - if (ready->n_ready == 0) - abort (); + + gcc_assert (ready->n_ready); t = ready->vec[ready->first--]; ready->n_ready--; /* If the queue becomes empty, reset it. */ @@ -803,10 +802,8 @@ ready_remove_first (struct ready_list *ready) HAIFA_INLINE static rtx ready_element (struct ready_list *ready, int index) { -#ifdef ENABLE_CHECKING - if (ready->n_ready == 0 || index >= ready->n_ready) - abort (); -#endif + gcc_assert (ready->n_ready && index < ready->n_ready); + return ready->vec[ready->first - index]; } @@ -822,8 +819,7 @@ ready_remove (struct ready_list *ready, int index) if (index == 0) return ready_remove_first (ready); - if (ready->n_ready == 0 || index >= ready->n_ready) - abort (); + gcc_assert (ready->n_ready && index < ready->n_ready); t = ready->vec[ready->first - index]; ready->n_ready--; for (i = index; i < ready->n_ready; i++) @@ -1105,12 +1101,7 @@ rm_line_notes (rtx head, rtx tail) prev = insn; insn = unlink_line_notes (insn, next_tail); - if (prev == tail) - abort (); - if (prev == head) - abort (); - if (insn == next_tail) - abort (); + gcc_assert (prev != tail && prev != head && insn != next_tail); } } } @@ -1289,12 +1280,7 @@ rm_other_notes (rtx head, rtx tail) insn = unlink_other_notes (insn, next_tail); - if (prev == tail) - abort (); - if (prev == head) - abort (); - if (insn == next_tail) - abort (); + gcc_assert (prev != tail && prev != head && insn != next_tail); } } } @@ -1868,18 +1854,19 @@ schedule_block (int b, int rgn_n_insns) and caused problems because schedule_block and compute_forward_dependences had different notions of what the "head" insn was. */ - if (head == tail && (! INSN_P (head))) - abort (); + gcc_assert (head != tail || INSN_P (head)); /* Debug info. */ if (sched_verbose) { - fprintf (sched_dump, ";; ======================================================\n"); + fprintf (sched_dump, + ";; ======================================================\n"); fprintf (sched_dump, ";; -- basic block %d from %d to %d -- %s reload\n", b, INSN_UID (head), INSN_UID (tail), (reload_completed ? "after" : "before")); - fprintf (sched_dump, ";; ======================================================\n"); + fprintf (sched_dump, + ";; ======================================================\n"); fprintf (sched_dump, "\n"); } @@ -1938,8 +1925,7 @@ schedule_block (int b, int rgn_n_insns) list. */ queue_to_ready (&ready); - if (ready.n_ready == 0) - abort (); + gcc_assert (ready.n_ready); if (sched_verbose >= 2) { @@ -2122,8 +2108,7 @@ schedule_block (int b, int rgn_n_insns) /* Sanity check -- queue must be empty now. Meaningless if region has multiple bbs. */ - if (current_sched_info->queue_must_finish_empty && q_size != 0) - abort (); + gcc_assert (!current_sched_info->queue_must_finish_empty || q_size); /* Update head/tail boundaries. */ head = NEXT_INSN (prev_head); |