diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-10 11:02:26 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-10 11:02:26 +0000 |
commit | 8127d0e073d0d792628af20a2df90ddf5177c623 (patch) | |
tree | e64840975a1fb341da6f0ef0ef7e39e120efacf6 /gcc/loop.c | |
parent | 108ebf88b21935d2e28ffe205b2126b49acf9e12 (diff) | |
download | gcc-8127d0e073d0d792628af20a2df90ddf5177c623.zip gcc-8127d0e073d0d792628af20a2df90ddf5177c623.tar.gz gcc-8127d0e073d0d792628af20a2df90ddf5177c623.tar.bz2 |
Revert 2004-09-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* lambda-mat.c (lambda_matrix_inverse_hard): Use gcc_assert
and gcc_unreachable instead of abort.
* lambda.h (lambda_vector_min_nz): Likewise.
* langhooks.c lhd_set_decl_assembler_name, lhd_can_use_bit_fields_p,
lhd_incomplete_type_error, lhd_expand_expr, lhd_types_compatible_p,
lhd_gimplify_expr): Likewise.
* lcm.c (optimize_mode_switching): Likewise.
* local-alloc.c (update_equiv_regs, 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, simplify_using_condition,
simplify_using_initial_values, shorten_into_mode,
canonicalize_iv_subregs, iv_number_of_iterations): Likewise.
* loop-unroll.c (unroll_and_peel_loops, peel_loop_completely,
unroll_loop_constant_iterations, unroll_loop_runtime_iterations,
peel_loop_simple, unroll_loop_stupid): Likewise.
* loop-unswitch.c (compare_and_jump_seq, unswitch_single_loop,
unswitch_loop): Likewise.
* loop.c (gen_prefetch, loop_optimize, rtx_equal_for_loop_p,
move_movables, replace_call_address, find_and_verify_loops,
rtx_equal_for_prefetch_p, record_giv, general_induction_var,
simplify_giv_expr, check_ext_dependent_givs, try_copy_prop,
loop_giv_dump): Likewise.
* loop.h (INSN_LUID): Likewise.
* modulo-sched.c (normalize_sched_times, generate_prolog_epilog,
sms_schedule, check_nodes_order): Likewise.
* optabs.c (gen_conditional, add_equal_note, expand_simple_binop,
expand_twoval_unop, expand_twoval_binop, expand_twoval_binop_libfunc,
expand_simple_unop, emit_no_conflict_block, prepare_cmp_insn,
emit_cmp_and_jump_insn_1, emit_cmp_and_jump_insns,
prepare_float_lib_cmp, gen_add2_insn, have_add2_insn, gen_sub2_insn,
have_sub2_insn, expand_float, expand_fix, debug_optab_libfuncs):
Likewise.
* opts.c (common_handle_option): Likewise.
* params.c (set_param_value): Likewise.
* passes.c (open_dump_file, rest_of_handle_final): Likewise.
* postreload-gcse.c (expr_equiv_p, oprs_unchanged_p,hash_scan_set,
reg_set_between_after_reload_p, reg_used_between_after_reload_p,
get_avail_load_store_reg, eliminate_partially_redundant_load):
Likewise.
* postreload.c (reload_cse_simplify_set, reload_combine_note_use):
Likewise.
* predict.c (tree_predicted_by_p, expected_value_to_br_prob,
propagate_freq, expensive_function_p): Likewise.
* pretty-print.c (pp_base_format_text)
* profile.c (instrument_edges, instrument_values,
compute_branch_probabilities, branch_prob, union_groups,
end_branch_prob, tree_register_profile_hooks): Likewise.
From-SVN: r87290
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 95 |
1 files changed, 51 insertions, 44 deletions
@@ -77,7 +77,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef HAVE_prefetch #define HAVE_prefetch 0 #define CODE_FOR_prefetch 0 -#define gen_prefetch(a,b,c) (gcc_unreachable(), NULL_RTX) +#define gen_prefetch(a,b,c) (abort(), NULL_RTX) #endif /* Give up the prefetch optimizations once we exceed a given threshold. @@ -501,8 +501,8 @@ loop_optimize (rtx f, FILE *dumpfile, int flags) /* See if we went too far. Note that get_max_uid already returns one more that the maximum uid of all insn. */ - gcc_assert (get_max_uid () <= max_uid_for_loop); - + if (get_max_uid () > max_uid_for_loop) + abort (); /* Now reset it to the actual size we need. See above. */ max_uid_for_loop = get_max_uid (); @@ -1746,7 +1746,7 @@ rtx_equal_for_loop_p (rtx x, rtx y, struct loop_movables *movables, contain anything but integers and other rtx's, except for within LABEL_REFs and SYMBOL_REFs. */ default: - gcc_unreachable (); + abort (); } } return 1; @@ -1940,24 +1940,21 @@ move_movables (struct loop *loop, struct loop_movables *movables, for (count = m->consec; count >= 0; count--) { - if (!NOTE_P (p)) + /* If this is the first insn of a library call sequence, + 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))) { - /* If this is the first insn of a library call - sequence, something is very 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 = XEXP (temp, 0); + while (temp != p) + temp = delete_insn (temp); } temp = p; @@ -2121,7 +2118,8 @@ move_movables (struct loop *loop, struct loop_movables *movables, << GET_MODE_BITSIZE (m->savemode))) - 1), reg, 1, OPTAB_LIB_WIDEN); - gcc_assert (tem != 0); + if (tem == 0) + abort (); if (tem != reg) emit_move_insn (reg, tem); sequence = get_insns (); @@ -2409,7 +2407,8 @@ replace_call_address (rtx x, rtx reg, rtx addr) case MEM: /* If this MEM uses a reg other than the one we expected, something is wrong. */ - gcc_assert (XEXP (x, 0) == reg); + if (XEXP (x, 0) != reg) + abort (); XEXP (x, 0) = addr; return; @@ -2724,7 +2723,8 @@ find_and_verify_loops (rtx f, struct loops *loops) break; case NOTE_INSN_LOOP_END: - gcc_assert (current_loop); + if (! current_loop) + abort (); current_loop->end = insn; current_loop = current_loop->outer; @@ -2912,7 +2912,6 @@ find_and_verify_loops (rtx f, struct loops *loops) if (invert_jump (p, new_label, 1)) { rtx q, r; - bool fail; /* If no suitable BARRIER was found, create a suitable one before TARGET. Since TARGET is a fall through @@ -2937,8 +2936,8 @@ find_and_verify_loops (rtx f, struct loops *loops) /* Include the BARRIER after INSN and copy the block after LOC. */ - fail = squeeze_notes (&new_label, &last_insn_to_move); - gcc_assert (!fail); + if (squeeze_notes (&new_label, &last_insn_to_move)) + abort (); reorder_insns (new_label, last_insn_to_move, loc); /* All those insns are now in TARGET_LOOP. */ @@ -2973,7 +2972,8 @@ find_and_verify_loops (rtx f, struct loops *loops) /* If we didn't find it, then something is wrong. */ - gcc_assert (r); + if (! r) + abort (); } /* P is now a jump outside the loop, so it must be put @@ -3683,7 +3683,7 @@ rtx_equal_for_prefetch_p (rtx x, rtx y) contain anything but integers and other rtx's, except for within LABEL_REFs and SYMBOL_REFs. */ default: - gcc_unreachable (); + abort (); } } return 1; @@ -5721,14 +5721,19 @@ record_giv (const struct loop *loop, struct induction *v, rtx insn, /* Add the giv to the class of givs computed from one biv. */ bl = REG_IV_CLASS (ivs, REGNO (src_reg)); - gcc_assert (bl); /* Fatal error, biv missing for this giv? */ - v->next_iv = bl->giv; - bl->giv = v; - /* Don't count DEST_ADDR. This is supposed to count the number of - insns that calculate givs. */ - if (type == DEST_REG) - bl->giv_count++; - bl->total_benefit += benefit; + if (bl) + { + v->next_iv = bl->giv; + bl->giv = v; + /* Don't count DEST_ADDR. This is supposed to count the number of + insns that calculate givs. */ + if (type == DEST_REG) + bl->giv_count++; + bl->total_benefit += benefit; + } + else + /* Fatal error, biv missing for this giv? */ + abort (); if (type == DEST_ADDR) { @@ -6383,7 +6388,7 @@ general_induction_var (const struct loop *loop, rtx x, rtx *src_reg, break; default: - gcc_unreachable (); + abort (); } /* Remove any enclosing USE from ADD_VAL and MULT_VAL (there will be @@ -6502,7 +6507,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit) ext_val, benefit); default: - gcc_unreachable (); + abort (); } /* Each argument must be either REG, PLUS, or MULT. Convert REG to @@ -6643,7 +6648,7 @@ simplify_giv_expr (const struct loop *loop, rtx x, rtx *ext_val, int *benefit) ext_val, benefit); default: - gcc_unreachable (); + abort (); } case ASHIFT: @@ -7395,7 +7400,7 @@ check_ext_dependent_givs (const struct loop *loop, struct iv_class *bl) break; default: - gcc_unreachable (); + abort (); } if (ok) @@ -10035,7 +10040,8 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno) && REG_P (SET_DEST (set)) && REGNO (SET_DEST (set)) == regno) { - gcc_assert (!init_insn); + if (init_insn) + abort (); init_insn = insn; if (REGNO_FIRST_UID (regno) == INSN_UID (insn)) @@ -10068,7 +10074,8 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno) } } } - gcc_assert (init_insn); + if (! init_insn) + abort (); if (apply_change_group ()) { if (loop_dump_stream) @@ -10569,7 +10576,7 @@ loop_giv_dump (const struct induction *v, FILE *file, int verbose) fprintf (file, " ext tr"); break; default: - gcc_unreachable (); + abort (); } } |