diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-07 15:46:53 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-07 15:46:53 +0000 |
commit | cc636d560f756da291b909e5c1790ffba37c4e8c (patch) | |
tree | ce9be778c6fd5bbc5eb633ed0344673882ecdabe /gcc/cfg.c | |
parent | 71bd4883d964169b14dfd5f83896fbc07cf2b55c (diff) | |
download | gcc-cc636d560f756da291b909e5c1790ffba37c4e8c.tar.gz |
* cfganal.c (flow_depth_first_order_compute, dfs_enumerate_from,
cfgbuild.c, inside_basic_block_p, control_flow_insn_p,
make_label_edge, make_edges, find_basic_blocks_1): Use gcc_assert
or gcc_unreachable.
* cfg.c (clear_edges, initialize_bb_rbi, compact_blocks,
remove_edge, alloc_aux_for_blocks, free_aux_for_blocks,
alloc_aux_for_edges, free_aux_for_edges): Likewise.
* cfgcleanup.c (try_forward_edges,
merge_blocks_move_predecessor_nojumps,
merge_blocks_move_successor_nojumps): Likewise.
* cfgexpand.c (expand_gimple_cond_expr,
expand_gimple_tailcall): Likewise.
* cfghooks.c (duplicate_block): Likewise.
* cfglayout.c (record_effective_endpoints,
insn_locators_initialize, change_scope, fixup_reorder_chain,
verify_insn_chain, fixup_fallthru_exit_predecessor,
duplicate_insn_chain, cfg_layout_finalize): Likewise.
* cfgloopanal.c (check_irred): Likewise.
* cfgloop.c (superloop_at_depth, flow_loops_free,
flow_loop_entry_edges_find, flow_loops_find,
flow_loop_outside_edge_p, get_loop_body,
get_loop_body_in_dom_order, get_loop_body_in_bfs_order,
get_loop_exit_edges, num_loop_branches, cancel_loop,
verify_loop_structure): Likewise.
cfgloopmanip.c (find_path, remove_path, loop_delete_branch_edge,
duplicate_loop_to_header_edge, create_preheader,
create_loop_notes): Likewise.
* cfgrtl.c (delete_insn, try_redirect_by_replacing_jump,
edirect_branch_edge, force_nonfallthru_and_redirect,
rtl_split_edge, insert_insn_on_edge, commit_one_edge_insertion,
commit_edge_insertions, commit_edge_insertions_watch_calls,
purge_dead_edges, cfg_layout_redirect_edge_and_branch,
cfg_layout_redirect_edge_and_branch_force,
cfg_layout_merge_blocks, rtl_flow_call_edges_add): Likewise.
* cgraph.c (cgraph_node, cgraph_create_edge, cgraph_remove_edge,
cgraph_redirect_edge_callee, cgraph_global_info, cgraph_rtl_info,
cgraph_varpool_node): Likewise.
* cgraphunit.c (cgraph_finalize_function,
cgraph_finalize_compilation_unit, cgraph_mark_functions_to_output,
cgraph_expand_function, cgraph_remove_unreachable_nodes,
cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
cgraph_mark_inline, cgraph_expand_all_functions,
cgraph_build_static_cdtor): Likewise.
* combine.c (do_SUBST, try_combine, subst, combine_simplify_rtx,
simplify_logical, distribute_notes, insn_cuid): Likewise.
* conflict.c (conflict_graph_add, print_conflict): Likewise.
* coverage.c (rtl_coverage_counter_ref, tree_coverage_counter_ref,
coverage_checksum_string): Likewise.
* cse.c (make_new_qty, make_regs_eqv, insert, invalidate,
hash_rtx, exp_equiv_p, cse_basic_block, count_reg_usage,
cse_cc_succs, cse_condition_code_reg): Likewise.
* cselib.c (entry_and_rtx_equal_p, remove_useless_values,
rtx_equal_for_cselib_p, wrap_constant, cselib_hash_rtx,
new_cselib_val, cselib_subst_to_values, cselib_invalidate_regno,
cselib_record_set): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87145 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r-- | gcc/cfg.c | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/gcc/cfg.c b/gcc/cfg.c index 19c242b99c9..3164ba0d06c 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -173,8 +173,7 @@ clear_edges (void) EXIT_BLOCK_PTR->pred = NULL; ENTRY_BLOCK_PTR->succ = NULL; - if (n_edges) - abort (); + gcc_assert (!n_edges); } /* Allocate memory for basic_block. */ @@ -211,8 +210,7 @@ free_rbi_pool (void) void initialize_bb_rbi (basic_block bb) { - if (bb->rbi) - abort (); + gcc_assert (!bb->rbi); bb->rbi = pool_alloc (rbi_pool); memset (bb->rbi, 0, sizeof (struct reorder_block_def)); } @@ -252,8 +250,7 @@ compact_blocks (void) i++; } - if (i != n_basic_blocks) - abort (); + gcc_assert (i == n_basic_blocks); for (; i < last_basic_block; i++) BASIC_BLOCK (i) = NULL; @@ -377,8 +374,7 @@ remove_edge (edge e) for (tmp = src->succ; tmp && tmp != e; tmp = tmp->succ_next) last_succ = tmp; - if (!tmp) - abort (); + gcc_assert (tmp); if (last_succ) last_succ->succ_next = e->succ_next; else @@ -387,8 +383,7 @@ remove_edge (edge e) for (tmp = dest->pred; tmp && tmp != e; tmp = tmp->pred_next) last_pred = tmp; - if (!tmp) - abort (); + gcc_assert (tmp); if (last_pred) last_pred->pred_next = e->pred_next; else @@ -696,8 +691,7 @@ inline void alloc_aux_for_block (basic_block bb, int size) { /* Verify that aux field is clear. */ - if (bb->aux || !first_block_aux_obj) - abort (); + gcc_assert (!bb->aux && first_block_aux_obj); bb->aux = obstack_alloc (&block_aux_obstack, size); memset (bb->aux, 0, size); } @@ -715,10 +709,10 @@ alloc_aux_for_blocks (int size) gcc_obstack_init (&block_aux_obstack); initialized = 1; } - - /* Check whether AUX data are still allocated. */ - else if (first_block_aux_obj) - abort (); + else + /* Check whether AUX data are still allocated. */ + gcc_assert (!first_block_aux_obj); + first_block_aux_obj = obstack_alloc (&block_aux_obstack, 0); if (size) { @@ -746,8 +740,7 @@ clear_aux_for_blocks (void) void free_aux_for_blocks (void) { - if (!first_block_aux_obj) - abort (); + gcc_assert (first_block_aux_obj); obstack_free (&block_aux_obstack, first_block_aux_obj); first_block_aux_obj = NULL; @@ -761,8 +754,7 @@ inline void alloc_aux_for_edge (edge e, int size) { /* Verify that aux field is clear. */ - if (e->aux || !first_edge_aux_obj) - abort (); + gcc_assert (!e->aux && first_edge_aux_obj); e->aux = obstack_alloc (&edge_aux_obstack, size); memset (e->aux, 0, size); } @@ -780,10 +772,9 @@ alloc_aux_for_edges (int size) gcc_obstack_init (&edge_aux_obstack); initialized = 1; } - - /* Check whether AUX data are still allocated. */ - else if (first_edge_aux_obj) - abort (); + else + /* Check whether AUX data are still allocated. */ + gcc_assert (!first_edge_aux_obj); first_edge_aux_obj = obstack_alloc (&edge_aux_obstack, 0); if (size) @@ -821,8 +812,7 @@ clear_aux_for_edges (void) void free_aux_for_edges (void) { - if (!first_edge_aux_obj) - abort (); + gcc_assert (first_edge_aux_obj); obstack_free (&edge_aux_obstack, first_edge_aux_obj); first_edge_aux_obj = NULL; |