diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-08 07:47:45 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-08 07:47:45 +0000 |
commit | 7bd4f6b63b19925aeac70cbaca769aef8d58ed91 (patch) | |
tree | badd4a59c4d7d42a6830a798ebfe95eb02d81f64 /gcc/dominance.c | |
parent | fd62c19a524b1f9c297d4eeb9a4cb3705e106be1 (diff) | |
download | gcc-7bd4f6b63b19925aeac70cbaca769aef8d58ed91.tar.gz |
* dbxout.c (dbxout_type, dbxout_type_name, dbxout_symbol): Use
gcc_assert and gcc_unreachable.
* ddg.c (create_ddg_dependence, add_deps_for_def,
add_deps_for_use, create_ddg, add_edge_to_ddg): Likewise.
* df.c (df_ref_unlink, df_ref_record, df_uses_record,
df_reg_def_chain_create, df_reg_use_chain_create, df_analyze,
df_insn_delete, df_refs_reg_replace, df_ref_reg_replace,
df_insns_modify, df_pattern_emit_before, df_bb_reg_live_start_p,
df_bb_reg_live_end_p, df_bb_regs_lives_compare,
df_bb_single_def_use_insn_find, dataflow_set_a_op_b,
dataflow_set_copy, hybrid_search, diagnostic.c,
diagnostic_build_prefix, diagnostic_count_diagnostic): Likewise.
* dojump.c (do_jump): Likewise.
* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
compute_dom_fast_query, calculate_dominance_info,
free_dominance_info, get_immediate_dominator,
set_immediate_dominator, get_dominated_by,
redirect_immediate_dominators, nearest_common_dominator,
dominated_by_p, verify_dominators, recount_dominator,
iterate_fix_dominators, add_to_dominance_info,
delete_from_dominance_info): Likewise.
* dwarf2asm.c (size_of_encoded_value, eh_data_format_name,
dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
dw2_force_const_mem, dw2_asm_output_encoded_addr_rtx): Likewise.
* dwarf2out.c (expand_builtin_init_dwarf_reg_sizes, reg_save,
initial_return_save, stack_adjust_offset, dwarf2out_stack_adjust,
flush_queued_reg_saves, dwarf2out_frame_debug_expr,
dwarf2out_frame_debug, dw_cfi_oprnd1_desc, output_cfi,
output_call_frame_info, output_loc_operands, build_cfa_loc,
decl_ultimate_origin, AT_flag, AT_int, AT_unsigned, AT_string,
AT_string_form, add_AT_specification, AT_ref, set_AT_ref_external,
AT_loc, AT_loc_list, AT_addr, AT_lbl, add_child_die,
splice_child_die, attr_checksum, same_dw_val_p,
break_out_includes, build_abbrev_table, size_of_die, mark_dies,
unmark_dies, value_format, output_loc_list, output_die,
output_pubnames, output_aranges, base_type_die, is_base_type,
modified_type_die, dbx_reg_number, multiple_reg_loc_descriptor,
mem_loc_descriptor, loc_descriptor, loc_descriptor_from_tree_1,
field_byte_offset, add_data_member_location_attribute,
add_const_value_attribute, rtl_for_decl_location,
add_location_or_const_value_attribute, add_byte_size_attribute,
add_bit_offset_attribute, add_bit_size_attribute,
add_abstract_origin_attribute, pop_decl_scope, scope_die_for,
decl_start_label, gen_formal_parameter_die,
gen_type_die_for_member, gen_subprogram_die, gen_label_die,
gen_typedef_die, gen_type_die, gen_tagged_type_instantiation_die,
force_decl_die, force_type_die, gen_decl_die,
dwarf2out_imported_module_or_decl, prune_unused_types_prune,
dwarf2out_finish): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r-- | gcc/dominance.c | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c index d46d8f56ecd..5d7f824d1d6 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -271,8 +271,7 @@ calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb, e_next = bn->succ; } - if (bn == en_block) - abort (); + gcc_assert (bn != en_block); /* Fill the DFS tree info calculatable _before_ recursing. */ if (bb != en_block) @@ -375,8 +374,7 @@ calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse) di->nodes = di->dfsnum - 1; /* This aborts e.g. when there is _no_ path from ENTRY to EXIT at all. */ - if (di->nodes != (unsigned int) n_basic_blocks + 1) - abort (); + gcc_assert (di->nodes == (unsigned int) n_basic_blocks + 1); } /* Compress the path from V to the root of its set and update path_min at the @@ -597,8 +595,7 @@ compute_dom_fast_query (enum cdi_direction dir) int num = 0; basic_block bb; - if (dom_computed[dir] < DOM_NO_FAST_QUERY) - abort (); + gcc_assert (dom_computed[dir] >= DOM_NO_FAST_QUERY); if (dom_computed[dir] == DOM_OK) return; @@ -629,8 +626,7 @@ calculate_dominance_info (enum cdi_direction dir) if (dom_computed[dir] != DOM_NONE) free_dominance_info (dir); - if (n_bbs_in_dom_tree[dir]) - abort (); + gcc_assert (!n_bbs_in_dom_tree[dir]); FOR_ALL_BB (b) { @@ -672,8 +668,7 @@ free_dominance_info (enum cdi_direction dir) } /* If there are any nodes left, something is wrong. */ - if (n_bbs_in_dom_tree[dir]) - abort (); + gcc_assert (!n_bbs_in_dom_tree[dir]); dom_computed[dir] = DOM_NONE; } @@ -684,8 +679,7 @@ get_immediate_dominator (enum cdi_direction dir, basic_block bb) { struct et_node *node = bb->dom[dir]; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (!node->father) return NULL; @@ -701,8 +695,7 @@ set_immediate_dominator (enum cdi_direction dir, basic_block bb, { struct et_node *node = bb->dom[dir]; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (node->father) { @@ -726,8 +719,7 @@ get_dominated_by (enum cdi_direction dir, basic_block bb, basic_block **bbs) int n; struct et_node *node = bb->dom[dir], *son = node->son, *ason; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (!son) { @@ -753,8 +745,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb, { struct et_node *bb_node = bb->dom[dir], *to_node = to->dom[dir], *son; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (!bb_node->son) return; @@ -775,8 +766,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb, basic_block nearest_common_dominator (enum cdi_direction dir, basic_block bb1, basic_block bb2) { - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (!bb1) return bb2; @@ -792,8 +782,7 @@ dominated_by_p (enum cdi_direction dir, basic_block bb1, basic_block bb2) { struct et_node *n1 = bb1->dom[dir], *n2 = bb2->dom[dir]; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (dom_computed[dir] == DOM_OK) return (n1->dfs_num_in >= n2->dfs_num_in @@ -809,8 +798,7 @@ verify_dominators (enum cdi_direction dir) int err = 0; basic_block bb; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); FOR_EACH_BB (bb) { @@ -838,8 +826,7 @@ verify_dominators (enum cdi_direction dir) } } - if (err) - abort (); + gcc_assert (!err); } /* Determine immediate dominator (or postdominator, according to DIR) of BB, @@ -853,8 +840,7 @@ recount_dominator (enum cdi_direction dir, basic_block bb) basic_block dom_bb = NULL; edge e; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); if (dir == CDI_DOMINATORS) { @@ -889,8 +875,7 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n) int i, changed = 1; basic_block old_dom, new_dom; - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); for (i = 0; i < n; i++) set_immediate_dominator (dir, bbs[i], NULL); @@ -911,18 +896,14 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n) } for (i = 0; i < n; i++) - if (!get_immediate_dominator (dir, bbs[i])) - abort (); + gcc_assert (get_immediate_dominator (dir, bbs[i])); } void add_to_dominance_info (enum cdi_direction dir, basic_block bb) { - if (!dom_computed[dir]) - abort (); - - if (bb->dom[dir]) - abort (); + gcc_assert (dom_computed[dir]); + gcc_assert (!bb->dom[dir]); n_bbs_in_dom_tree[dir]++; @@ -935,8 +916,7 @@ add_to_dominance_info (enum cdi_direction dir, basic_block bb) void delete_from_dominance_info (enum cdi_direction dir, basic_block bb) { - if (!dom_computed[dir]) - abort (); + gcc_assert (dom_computed[dir]); et_free_tree (bb->dom[dir]); bb->dom[dir] = NULL; |