basic-block.h (single_succ_edge): Use gcc_checking_assert.

* basic-block.h (single_succ_edge): Use gcc_checking_assert.
	(single_pred_edge, ei_container, ei_next, ei_prev): Likewise.
	* cfghooks.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (cfg_layout_merge_blocks): Likewise.
	* cgraph.c (cgraph_add_thunk): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_create_virtual_clone): Likewise.
	* ddg.c (add_cross_iteration_register_deps): Likewise.
	* dwarf2out.c (modified_type_die): Likewise.
	* emit-rtl.c (set_mem_alias_set): Likewise.
	* ggc-zone.c (zone_allocate_marks): Likewise.
	* gimple-iterator.c (gsi_move_to_bb_end): Likewise.
	* gimple.c (iterative_hash_gimple_type): Likewise.
	* graphite-scop-detection.c (create_single_entry_edge): Likewise.
	(create_single_exit_edge): Likewise.
	* haifa-sched.c (choose_ready): Likewise.
	* lto-streamer-in.c (input_gimple_stmt): Likewise.
	* passes.c (execute_todo): Likewise.
	* sched-ebb.c (begin_schedule_ready): Likewise.
	* sel-sched.c (code_motion_process_successors): Likewise.
	* tree-call-cdce.c (gen_conditions_for_pow): Likewise.
	* tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise.
	* tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise.
	(phi_arg_index_from_use, phi_ssa_name_p): Likewise.
	* tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise.
	* tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise.
	(ssa_conflicts_add): Likewise.
	* tree-ssa-copy.c (replace_exp): Likewise.
	* tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
	* tree-ssa-forwprop.c (simple_gimple_switch): Likewise.
	* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
	* tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise.
	(compute_antic): Likewise.
	* tree-ssa-ter.c (add_to_partition_kill_list): Likewise.
	(add_dependence): Likewise.
	(process_replaceable, kill_expr, find_replaceable_exprs): Likewise.
	* tree-vrp.c (supports_overflow_infinity): Likewise.
	(make_overflow_infinity, negative_overflow_infinity): Likewise.
	(avoid_overflow_infinity, register_new_assert_for): Likewise.
	(process_assert_insertions_for): Likewise.
	* var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise.
	(dv_from_value, variable_union, find_loc_in_1pdv): Likewise.
	(intersect_loc_chains, variable_merge_over_cur): Likewise.

From-SVN: r165774
This commit is contained in:
Nathan Froyd 2010-10-21 13:08:28 +00:00 committed by Nathan Froyd
parent 31ff2426f6
commit 77a74ed7f0
30 changed files with 159 additions and 238 deletions

View File

@ -1,3 +1,49 @@
2010-10-21 Nathan Froyd <froydnj@codesourcery.com>
* basic-block.h (single_succ_edge): Use gcc_checking_assert.
(single_pred_edge, ei_container, ei_next, ei_prev): Likewise.
* cfghooks.c (fixup_reorder_chain): Likewise.
* cfgrtl.c (cfg_layout_merge_blocks): Likewise.
* cgraph.c (cgraph_add_thunk): Likewise.
(cgraph_create_edge_1): Likewise.
(cgraph_create_virtual_clone): Likewise.
* ddg.c (add_cross_iteration_register_deps): Likewise.
* dwarf2out.c (modified_type_die): Likewise.
* emit-rtl.c (set_mem_alias_set): Likewise.
* ggc-zone.c (zone_allocate_marks): Likewise.
* gimple-iterator.c (gsi_move_to_bb_end): Likewise.
* gimple.c (iterative_hash_gimple_type): Likewise.
* graphite-scop-detection.c (create_single_entry_edge): Likewise.
(create_single_exit_edge): Likewise.
* haifa-sched.c (choose_ready): Likewise.
* lto-streamer-in.c (input_gimple_stmt): Likewise.
* passes.c (execute_todo): Likewise.
* sched-ebb.c (begin_schedule_ready): Likewise.
* sel-sched.c (code_motion_process_successors): Likewise.
* tree-call-cdce.c (gen_conditions_for_pow): Likewise.
* tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise.
* tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise.
(phi_arg_index_from_use, phi_ssa_name_p): Likewise.
* tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise.
* tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise.
(ssa_conflicts_add): Likewise.
* tree-ssa-copy.c (replace_exp): Likewise.
* tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
* tree-ssa-forwprop.c (simple_gimple_switch): Likewise.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
* tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise.
(compute_antic): Likewise.
* tree-ssa-ter.c (add_to_partition_kill_list): Likewise.
(add_dependence): Likewise.
(process_replaceable, kill_expr, find_replaceable_exprs): Likewise.
* tree-vrp.c (supports_overflow_infinity): Likewise.
(make_overflow_infinity, negative_overflow_infinity): Likewise.
(avoid_overflow_infinity, register_new_assert_for): Likewise.
(process_assert_insertions_for): Likewise.
* var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise.
(dv_from_value, variable_union, find_loc_in_1pdv): Likewise.
(intersect_loc_chains, variable_merge_over_cur): Likewise.
2010-10-21 Nathan Froyd <froydnj@codesourcery.com> 2010-10-21 Nathan Froyd <froydnj@codesourcery.com>
* cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred. * cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred.

View File

@ -560,9 +560,7 @@ single_pred_p (const_basic_block bb)
static inline edge static inline edge
single_succ_edge (const_basic_block bb) single_succ_edge (const_basic_block bb)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (single_succ_p (bb));
gcc_assert (single_succ_p (bb));
#endif
return EDGE_SUCC (bb, 0); return EDGE_SUCC (bb, 0);
} }
@ -572,9 +570,7 @@ single_succ_edge (const_basic_block bb)
static inline edge static inline edge
single_pred_edge (const_basic_block bb) single_pred_edge (const_basic_block bb)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (single_pred_p (bb));
gcc_assert (single_pred_p (bb));
#endif
return EDGE_PRED (bb, 0); return EDGE_PRED (bb, 0);
} }
@ -606,9 +602,7 @@ typedef struct {
static inline VEC(edge,gc) * static inline VEC(edge,gc) *
ei_container (edge_iterator i) ei_container (edge_iterator i)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (i.container);
gcc_assert (i.container);
#endif
return *i.container; return *i.container;
} }
@ -659,9 +653,7 @@ ei_one_before_end_p (edge_iterator i)
static inline void static inline void
ei_next (edge_iterator *i) ei_next (edge_iterator *i)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (i->index < EDGE_COUNT (ei_container (*i)));
gcc_assert (i->index < EDGE_COUNT (ei_container (*i)));
#endif
i->index++; i->index++;
} }
@ -669,9 +661,7 @@ ei_next (edge_iterator *i)
static inline void static inline void
ei_prev (edge_iterator *i) ei_prev (edge_iterator *i)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (i->index > 0);
gcc_assert (i->index > 0);
#endif
i->index--; i->index--;
} }

View File

@ -906,9 +906,7 @@ duplicate_block (basic_block bb, edge e, basic_block after)
if (bb->count < new_count) if (bb->count < new_count)
new_count = bb->count; new_count = bb->count;
#ifdef ENABLE_CHECKING gcc_checking_assert (can_duplicate_block_p (bb));
gcc_assert (can_duplicate_block_p (bb));
#endif
new_bb = cfg_hooks->duplicate_block (bb); new_bb = cfg_hooks->duplicate_block (bb);
if (after) if (after)

View File

@ -828,10 +828,8 @@ fixup_reorder_chain (void)
: label_for_bb (e_fall->dest)), 0)) : label_for_bb (e_fall->dest)), 0))
{ {
e_fall->flags &= ~EDGE_FALLTHRU; e_fall->flags &= ~EDGE_FALLTHRU;
#ifdef ENABLE_CHECKING gcc_checking_assert (could_fall_through
gcc_assert (could_fall_through
(e_taken->src, e_taken->dest)); (e_taken->src, e_taken->dest));
#endif
e_taken->flags |= EDGE_FALLTHRU; e_taken->flags |= EDGE_FALLTHRU;
update_br_prob_note (bb); update_br_prob_note (bb);
e = e_fall, e_fall = e_taken, e_taken = e; e = e_fall, e_fall = e_taken, e_taken = e;
@ -852,10 +850,8 @@ fixup_reorder_chain (void)
: label_for_bb (e_fall->dest)), 0)) : label_for_bb (e_fall->dest)), 0))
{ {
e_fall->flags &= ~EDGE_FALLTHRU; e_fall->flags &= ~EDGE_FALLTHRU;
#ifdef ENABLE_CHECKING gcc_checking_assert (could_fall_through
gcc_assert (could_fall_through
(e_taken->src, e_taken->dest)); (e_taken->src, e_taken->dest));
#endif
e_taken->flags |= EDGE_FALLTHRU; e_taken->flags |= EDGE_FALLTHRU;
update_br_prob_note (bb); update_br_prob_note (bb);
continue; continue;

View File

@ -2692,9 +2692,7 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b)
static void static void
cfg_layout_merge_blocks (basic_block a, basic_block b) cfg_layout_merge_blocks (basic_block a, basic_block b)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (cfg_layout_can_merge_blocks_p (a, b));
gcc_assert (cfg_layout_can_merge_blocks_p (a, b));
#endif
if (dump_file) if (dump_file)
fprintf (dump_file, "merging block %d into block %d\n", b->index, a->index); fprintf (dump_file, "merging block %d into block %d\n", b->index, a->index);

View File

@ -594,10 +594,9 @@ cgraph_add_thunk (tree alias, tree decl, bool this_adjusting,
node = cgraph_same_body_alias_1 (alias, decl); node = cgraph_same_body_alias_1 (alias, decl);
gcc_assert (node); gcc_assert (node);
#ifdef ENABLE_CHECKING gcc_checking_assert (!virtual_offset
gcc_assert (!virtual_offset || tree_int_cst_equal (virtual_offset,
|| tree_int_cst_equal (virtual_offset, size_int (virtual_value))); size_int (virtual_value)));
#endif
node->thunk.fixed_offset = fixed_offset; node->thunk.fixed_offset = fixed_offset;
node->thunk.this_adjusting = this_adjusting; node->thunk.this_adjusting = this_adjusting;
node->thunk.virtual_value = virtual_value; node->thunk.virtual_value = virtual_value;
@ -984,11 +983,9 @@ cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
have not been loaded yet. */ have not been loaded yet. */
if (call_stmt) if (call_stmt)
{ {
#ifdef ENABLE_CHECKING /* This is a rather expensive check possibly trigerring
/* This is rather pricely check possibly trigerring construction of construction of call stmt hashtable. */
call stmt hashtable. */ gcc_checking_assert (!cgraph_edge (caller, call_stmt));
gcc_assert (!cgraph_edge (caller, call_stmt));
#endif
gcc_assert (is_gimple_call (call_stmt)); gcc_assert (is_gimple_call (call_stmt));
} }
@ -2258,10 +2255,8 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
size_t i; size_t i;
struct ipa_replace_map *map; struct ipa_replace_map *map;
#ifdef ENABLE_CHECKING
if (!flag_wpa) if (!flag_wpa)
gcc_assert (tree_versionable_function_p (old_decl)); gcc_checking_assert (tree_versionable_function_p (old_decl));
#endif
/* Make a new FUNCTION_DECL tree node */ /* Make a new FUNCTION_DECL tree node */
if (!args_to_skip) if (!args_to_skip)

View File

@ -262,10 +262,9 @@ add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
gcc_assert (last_def_node); gcc_assert (last_def_node);
gcc_assert (first_def); gcc_assert (first_def);
#ifdef ENABLE_CHECKING
if (DF_REF_ID (last_def) != DF_REF_ID (first_def)) if (DF_REF_ID (last_def) != DF_REF_ID (first_def))
gcc_assert (!bitmap_bit_p (&bb_info->gen, DF_REF_ID (first_def))); gcc_checking_assert (!bitmap_bit_p (&bb_info->gen,
#endif DF_REF_ID (first_def)));
/* Create inter-loop true dependences and anti dependences. */ /* Create inter-loop true dependences and anti dependences. */
for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next) for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next)

View File

@ -12715,15 +12715,14 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
&& TYPE_NAME (qualified_type) && TYPE_NAME (qualified_type)
&& TREE_CODE (TYPE_NAME (qualified_type)) == TYPE_DECL) && TREE_CODE (TYPE_NAME (qualified_type)) == TYPE_DECL)
{ {
#ifdef ENABLE_CHECKING tree t = TREE_TYPE (TYPE_NAME (qualified_type));
gcc_assert (TREE_CODE (TREE_TYPE (TYPE_NAME (qualified_type)))
== INTEGER_TYPE gcc_checking_assert (TREE_CODE (t) == INTEGER_TYPE
&& TYPE_PRECISION (TREE_TYPE (TYPE_NAME (qualified_type))) && TYPE_PRECISION (t)
== TYPE_PRECISION (qualified_type) == TYPE_PRECISION (qualified_type)
&& TYPE_UNSIGNED (TREE_TYPE (TYPE_NAME (qualified_type))) && TYPE_UNSIGNED (t)
== TYPE_UNSIGNED (qualified_type)); == TYPE_UNSIGNED (qualified_type));
#endif qualified_type = t;
qualified_type = TREE_TYPE (TYPE_NAME (qualified_type));
} }
/* If we do, then we can just use its DIE, if it exists. */ /* If we do, then we can just use its DIE, if it exists. */

View File

@ -1839,10 +1839,8 @@ set_mem_attributes (rtx ref, tree t, int objectp)
void void
set_mem_alias_set (rtx mem, alias_set_type set) set_mem_alias_set (rtx mem, alias_set_type set)
{ {
#ifdef ENABLE_CHECKING
/* If the new and old alias sets don't conflict, something is wrong. */ /* If the new and old alias sets don't conflict, something is wrong. */
gcc_assert (alias_sets_conflict_p (set, MEM_ALIAS_SET (mem))); gcc_checking_assert (alias_sets_conflict_p (set, MEM_ALIAS_SET (mem)));
#endif
MEM_ATTRS (mem) = get_mem_attrs (set, MEM_EXPR (mem), MEM_OFFSET (mem), MEM_ATTRS (mem) = get_mem_attrs (set, MEM_EXPR (mem), MEM_OFFSET (mem),
MEM_SIZE (mem), MEM_ALIGN (mem), MEM_SIZE (mem), MEM_ALIGN (mem),

View File

@ -802,9 +802,7 @@ zone_allocate_marks (void)
n++; n++;
#endif #endif
} }
#ifdef ENABLE_CHECKING gcc_checking_assert (n == zone->n_small_pages);
gcc_assert (n == zone->n_small_pages);
#endif
} }
/* We don't collect the PCH zone, but we do have to mark it /* We don't collect the PCH zone, but we do have to mark it

View File

@ -597,9 +597,7 @@ void
gsi_move_to_bb_end (gimple_stmt_iterator *from, basic_block bb) gsi_move_to_bb_end (gimple_stmt_iterator *from, basic_block bb)
{ {
gimple_stmt_iterator last = gsi_last_bb (bb); gimple_stmt_iterator last = gsi_last_bb (bb);
#ifdef ENABLE_CHECKING gcc_checking_assert (gsi_bb (last) == bb);
gcc_assert (gsi_bb (last) == bb);
#endif
/* Have to check gsi_end_p because it could be an empty block. */ /* Have to check gsi_end_p because it could be an empty block. */
if (!gsi_end_p (last) && is_ctrl_stmt (gsi_stmt (last))) if (!gsi_end_p (last) && is_ctrl_stmt (gsi_stmt (last)))

View File

@ -3999,10 +3999,8 @@ iterative_hash_gimple_type (tree type, hashval_t val,
void **slot; void **slot;
struct sccs *state; struct sccs *state;
#ifdef ENABLE_CHECKING
/* Not visited during this DFS walk. */ /* Not visited during this DFS walk. */
gcc_assert (!pointer_map_contains (sccstate, type)); gcc_checking_assert (!pointer_map_contains (sccstate, type));
#endif
state = XOBNEW (sccstate_obstack, struct sccs); state = XOBNEW (sccstate_obstack, struct sccs);
*pointer_map_insert (sccstate, type) = state; *pointer_map_insert (sccstate, type) = state;

View File

@ -899,9 +899,7 @@ create_single_entry_edge (sd_region *region)
single edge pointing from outside into the loop. */ single edge pointing from outside into the loop. */
gcc_unreachable (); gcc_unreachable ();
#ifdef ENABLE_CHECKING gcc_checking_assert (find_single_entry_edge (region));
gcc_assert (find_single_entry_edge (region));
#endif
} }
/* Check if the sd_region, mentioned in EDGE, has no exit bb. */ /* Check if the sd_region, mentioned in EDGE, has no exit bb. */
@ -967,9 +965,7 @@ create_single_exit_edge (sd_region *region)
if (e->aux) if (e->aux)
((sd_region *) e->aux)->exit = forwarder->dest; ((sd_region *) e->aux)->exit = forwarder->dest;
#ifdef ENABLE_CHECKING gcc_checking_assert (find_single_exit_edge (region));
gcc_assert (find_single_exit_edge (region));
#endif
} }
/* Unmark the exit edges of all REGIONS. /* Unmark the exit edges of all REGIONS.

View File

@ -2727,14 +2727,12 @@ choose_ready (struct ready_list *ready, rtx *insn_ptr)
{ {
insn = ready_element (ready, i); insn = ready_element (ready, i);
#ifdef ENABLE_CHECKING
/* If this insn is recognizable we should have already /* If this insn is recognizable we should have already
recognized it earlier. recognized it earlier.
??? Not very clear where this is supposed to be done. ??? Not very clear where this is supposed to be done.
See dep_cost_1. */ See dep_cost_1. */
gcc_assert (INSN_CODE (insn) >= 0 gcc_checking_assert (INSN_CODE (insn) >= 0
|| recog_memoized (insn) < 0); || recog_memoized (insn) < 0);
#endif
ready_try [i] ready_try [i]
= (/* INSN_CODE check can be omitted here as it is also done later = (/* INSN_CODE check can be omitted here as it is also done later

View File

@ -973,9 +973,7 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
to unify some types and thus not find a proper to unify some types and thus not find a proper
field-decl here. So only assert here if checking field-decl here. So only assert here if checking
is enabled. */ is enabled. */
#ifdef ENABLE_CHECKING gcc_checking_assert (tem != NULL_TREE);
gcc_assert (tem != NULL_TREE);
#endif
if (tem != NULL_TREE) if (tem != NULL_TREE)
TREE_OPERAND (op, 1) = tem; TREE_OPERAND (op, 1) = tem;
} }

View File

@ -1310,9 +1310,7 @@ execute_todo (unsigned int flags)
static void static void
verify_interpass_invariants (void) verify_interpass_invariants (void)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (!fold_deferring_overflow_warnings_p ());
gcc_assert (!fold_deferring_overflow_warnings_p ());
#endif
} }
/* Clear the last verified flag. */ /* Clear the last verified flag. */

View File

@ -147,10 +147,9 @@ begin_schedule_ready (rtx insn, rtx last)
e = find_fallthru_edge (last_bb->succs); e = find_fallthru_edge (last_bb->succs);
#ifdef ENABLE_CHECKING gcc_checking_assert (!e || !(e->flags & EDGE_COMPLEX));
gcc_assert (!e || !(e->flags & EDGE_COMPLEX));
gcc_assert (BLOCK_FOR_INSN (insn) == last_bb gcc_checking_assert (BLOCK_FOR_INSN (insn) == last_bb
&& !IS_SPECULATION_CHECK_P (insn) && !IS_SPECULATION_CHECK_P (insn)
&& BB_HEAD (last_bb) != insn && BB_HEAD (last_bb) != insn
&& BB_END (last_bb) == insn); && BB_END (last_bb) == insn);
@ -160,11 +159,10 @@ begin_schedule_ready (rtx insn, rtx last)
x = NEXT_INSN (insn); x = NEXT_INSN (insn);
if (e) if (e)
gcc_assert (NOTE_P (x) || LABEL_P (x)); gcc_checking_assert (NOTE_P (x) || LABEL_P (x));
else else
gcc_assert (BARRIER_P (x)); gcc_checking_assert (BARRIER_P (x));
} }
#endif
if (e) if (e)
{ {

View File

@ -6360,7 +6360,6 @@ code_motion_process_successors (insn_t insn, av_set_t orig_ops,
goto rescan; goto rescan;
} }
#ifdef ENABLE_CHECKING
/* Here, RES==1 if original expr was found at least for one of the /* Here, RES==1 if original expr was found at least for one of the
successors. After the loop, RES may happen to have zero value successors. After the loop, RES may happen to have zero value
only if at some point the expr searched is present in av_set, but is only if at some point the expr searched is present in av_set, but is
@ -6368,12 +6367,11 @@ code_motion_process_successors (insn_t insn, av_set_t orig_ops,
The exception is when the original operation is blocked by The exception is when the original operation is blocked by
bookkeeping generated for another fence or for another path in current bookkeeping generated for another fence or for another path in current
move_op. */ move_op. */
gcc_assert (res == 1 gcc_checking_assert (res == 1
|| (res == 0 || (res == 0
&& av_set_could_be_blocked_by_bookkeeping_p (orig_ops, && av_set_could_be_blocked_by_bookkeeping_p (orig_ops,
static_params)) static_params))
|| res == -1); || res == -1);
#endif
/* Merge data, clean up, etc. */ /* Merge data, clean up, etc. */
if (res != -1 && code_motion_path_driver_info->after_merge_succs) if (res != -1 && code_motion_path_driver_info->after_merge_succs)

View File

@ -541,9 +541,7 @@ gen_conditions_for_pow (gimple pow_call, VEC (gimple, heap) *conds,
tree base, expn; tree base, expn;
enum tree_code bc; enum tree_code bc;
#ifdef ENABLE_CHECKING gcc_checking_assert (check_pow (pow_call));
gcc_assert (check_pow (pow_call));
#endif
*nconds = 0; *nconds = 0;

View File

@ -279,9 +279,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
|| (single_succ_edge (bb)->flags & EDGE_ABNORMAL)) || (single_succ_edge (bb)->flags & EDGE_ABNORMAL))
return false; return false;
#if ENABLE_CHECKING gcc_checking_assert (bb != ENTRY_BLOCK_PTR);
gcc_assert (bb != ENTRY_BLOCK_PTR);
#endif
locus = single_succ_edge (bb)->goto_locus; locus = single_succ_edge (bb)->goto_locus;

View File

@ -230,10 +230,8 @@ link_imm_use (ssa_use_operand_t *linknode, tree def)
else else
{ {
root = &(SSA_NAME_IMM_USE_NODE (def)); root = &(SSA_NAME_IMM_USE_NODE (def));
#ifdef ENABLE_CHECKING
if (linknode->use) if (linknode->use)
gcc_checking_assert (*(linknode->use) == def); gcc_checking_assert (*(linknode->use) == def);
#endif
link_imm_use_to_list (linknode, root); link_imm_use_to_list (linknode, root);
} }
} }
@ -556,13 +554,11 @@ phi_arg_index_from_use (use_operand_p use)
root = gimple_phi_arg (phi, 0); root = gimple_phi_arg (phi, 0);
index = element - root; index = element - root;
#ifdef ENABLE_CHECKING
/* Make sure the calculation doesn't have any leftover bytes. If it does, /* Make sure the calculation doesn't have any leftover bytes. If it does,
then imm_use is likely not the first element in phi_arg_d. */ then imm_use is likely not the first element in phi_arg_d. */
gcc_assert ((((char *)element - (char *)root) gcc_checking_assert ((((char *)element - (char *)root)
% sizeof (struct phi_arg_d)) == 0 % sizeof (struct phi_arg_d)) == 0
&& index < gimple_phi_capacity (phi)); && index < gimple_phi_capacity (phi));
#endif
return index; return index;
} }
@ -613,9 +609,7 @@ phi_ssa_name_p (const_tree t)
{ {
if (TREE_CODE (t) == SSA_NAME) if (TREE_CODE (t) == SSA_NAME)
return true; return true;
#ifdef ENABLE_CHECKING gcc_checking_assert (is_gimple_min_invariant (t));
gcc_assert (is_gimple_min_invariant (t));
#endif
return false; return false;
} }
@ -975,9 +969,7 @@ static inline use_operand_p
move_use_after_head (use_operand_p use_p, use_operand_p head, move_use_after_head (use_operand_p use_p, use_operand_p head,
use_operand_p last_p) use_operand_p last_p)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (USE_FROM_PTR (use_p) == USE_FROM_PTR (head));
gcc_assert (USE_FROM_PTR (use_p) == USE_FROM_PTR (head));
#endif
/* Skip head when we find it. */ /* Skip head when we find it. */
if (use_p != head) if (use_p != head)
{ {

View File

@ -2998,12 +2998,10 @@ insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks,
bitmap_iterator bi; bitmap_iterator bi;
unsigned i; unsigned i;
#if defined ENABLE_CHECKING
if (TREE_CODE (var) == SSA_NAME) if (TREE_CODE (var) == SSA_NAME)
gcc_assert (is_old_name (var)); gcc_checking_assert (is_old_name (var));
else else
gcc_assert (symbol_marked_for_renaming (var)); gcc_checking_assert (symbol_marked_for_renaming (var));
#endif
/* Get all the definition sites for VAR. */ /* Get all the definition sites for VAR. */
db = find_def_blocks_for (var); db = find_def_blocks_for (var);

View File

@ -547,11 +547,9 @@ ssa_conflicts_test_p (ssa_conflicts_p ptr, unsigned x, unsigned y)
{ {
bitmap b; bitmap b;
#ifdef ENABLE_CHECKING gcc_checking_assert (x < ptr->size);
gcc_assert (x < ptr->size); gcc_checking_assert (y < ptr->size);
gcc_assert (y < ptr->size); gcc_checking_assert (x != y);
gcc_assert (x != y);
#endif
b = ptr->conflicts[x]; b = ptr->conflicts[x];
if (b) if (b)
@ -579,11 +577,9 @@ ssa_conflicts_add_one (ssa_conflicts_p ptr, unsigned x, unsigned y)
static inline void static inline void
ssa_conflicts_add (ssa_conflicts_p ptr, unsigned x, unsigned y) ssa_conflicts_add (ssa_conflicts_p ptr, unsigned x, unsigned y)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (x < ptr->size);
gcc_assert (x < ptr->size); gcc_checking_assert (y < ptr->size);
gcc_assert (y < ptr->size); gcc_checking_assert (x != y);
gcc_assert (x != y);
#endif
ssa_conflicts_add_one (ptr, x, y); ssa_conflicts_add_one (ptr, x, y);
ssa_conflicts_add_one (ptr, y, x); ssa_conflicts_add_one (ptr, y, x);
} }

View File

@ -211,12 +211,10 @@ replace_exp (use_operand_p op_p, tree val)
void void
propagate_tree_value (tree *op_p, tree val) propagate_tree_value (tree *op_p, tree val)
{ {
#if defined ENABLE_CHECKING gcc_checking_assert (!(TREE_CODE (val) == SSA_NAME
gcc_assert (!(TREE_CODE (val) == SSA_NAME
&& *op_p && *op_p
&& TREE_CODE (*op_p) == SSA_NAME && TREE_CODE (*op_p) == SSA_NAME
&& !may_propagate_copy (*op_p, val))); && !may_propagate_copy (*op_p, val)));
#endif
if (TREE_CODE (val) == SSA_NAME) if (TREE_CODE (val) == SSA_NAME)
*op_p = val; *op_p = val;

View File

@ -1852,10 +1852,8 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi)
|| useless_type_conversion_p (expr_type, TREE_TYPE (cached_lhs)))) || useless_type_conversion_p (expr_type, TREE_TYPE (cached_lhs))))
|| may_propagate_copy_into_stmt (stmt, cached_lhs)) || may_propagate_copy_into_stmt (stmt, cached_lhs))
{ {
#if defined ENABLE_CHECKING gcc_checking_assert (TREE_CODE (cached_lhs) == SSA_NAME
gcc_assert (TREE_CODE (cached_lhs) == SSA_NAME
|| is_gimple_min_invariant (cached_lhs)); || is_gimple_min_invariant (cached_lhs));
#endif
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {

View File

@ -1286,10 +1286,8 @@ simplify_gimple_switch (gimple stmt)
def = gimple_assign_rhs1 (def_stmt); def = gimple_assign_rhs1 (def_stmt);
#ifdef ENABLE_CHECKING
/* ??? Why was Jeff testing this? We are gimple... */ /* ??? Why was Jeff testing this? We are gimple... */
gcc_assert (is_gimple_val (def)); gcc_checking_assert (is_gimple_val (def));
#endif
to = TREE_TYPE (cond); to = TREE_TYPE (cond);
ti = TREE_TYPE (def); ti = TREE_TYPE (def);

View File

@ -895,9 +895,7 @@ bitmap_value_insert_into_set (bitmap_set_t set, pre_expr expr)
{ {
unsigned int val = get_expr_value_id (expr); unsigned int val = get_expr_value_id (expr);
#ifdef ENABLE_CHECKING gcc_checking_assert (expr->id == get_or_alloc_expression_id (expr));
gcc_assert (expr->id == get_or_alloc_expression_id (expr));
#endif
/* Constant values are always considered to be part of the set. */ /* Constant values are always considered to be part of the set. */
if (value_id_constant_p (val)) if (value_id_constant_p (val))
@ -2608,10 +2606,8 @@ compute_antic (void)
block->index)); block->index));
} }
} }
#ifdef ENABLE_CHECKING
/* Theoretically possible, but *highly* unlikely. */ /* Theoretically possible, but *highly* unlikely. */
gcc_assert (num_iterations < 500); gcc_checking_assert (num_iterations < 500);
#endif
} }
statistics_histogram_event (cfun, "compute_antic iterations", statistics_histogram_event (cfun, "compute_antic iterations",
@ -2640,10 +2636,8 @@ compute_antic (void)
block->index)); block->index));
} }
} }
#ifdef ENABLE_CHECKING
/* Theoretically possible, but *highly* unlikely. */ /* Theoretically possible, but *highly* unlikely. */
gcc_assert (num_iterations < 500); gcc_checking_assert (num_iterations < 500);
#endif
} }
statistics_histogram_event (cfun, "compute_partial_antic iterations", statistics_histogram_event (cfun, "compute_partial_antic iterations",
num_iterations); num_iterations);

View File

@ -296,9 +296,7 @@ add_to_partition_kill_list (temp_expr_table_p tab, int p, int ver)
static inline void static inline void
remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version) remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (tab->kill_list[p]);
gcc_assert (tab->kill_list[p]);
#endif
bitmap_clear_bit (tab->kill_list[p], version); bitmap_clear_bit (tab->kill_list[p], version);
if (bitmap_empty_p (tab->kill_list[p])) if (bitmap_empty_p (tab->kill_list[p]))
{ {
@ -345,10 +343,8 @@ add_dependence (temp_expr_table_p tab, int version, tree var)
else else
{ {
i = var_to_partition (tab->map, var); i = var_to_partition (tab->map, var);
#ifdef ENABLE_CHECKING gcc_checking_assert (i != NO_PARTITION);
gcc_assert (i != NO_PARTITION); gcc_checking_assert (tab->num_in_part[i] != 0);
gcc_assert (tab->num_in_part[i] != 0);
#endif
/* Only dependencies on ssa_names which are coalesced with something need /* Only dependencies on ssa_names which are coalesced with something need
to be tracked. Partitions with containing only a single SSA_NAME to be tracked. Partitions with containing only a single SSA_NAME
*cannot* have their value changed. */ *cannot* have their value changed. */
@ -479,9 +475,7 @@ process_replaceable (temp_expr_table_p tab, gimple stmt, int call_cnt)
ssa_op_iter iter; ssa_op_iter iter;
bitmap def_vars, use_vars; bitmap def_vars, use_vars;
#ifdef ENABLE_CHECKING gcc_checking_assert (is_replaceable_p (stmt));
gcc_assert (is_replaceable_p (stmt));
#endif
def = SINGLE_SSA_TREE_OPERAND (stmt, SSA_OP_DEF); def = SINGLE_SSA_TREE_OPERAND (stmt, SSA_OP_DEF);
version = SSA_NAME_VERSION (def); version = SSA_NAME_VERSION (def);
@ -534,9 +528,7 @@ kill_expr (temp_expr_table_p tab, int partition)
finished_with_expr (tab, version, true); finished_with_expr (tab, version, true);
} }
#ifdef ENABLE_CHECKING gcc_checking_assert (!tab->kill_list[partition]);
gcc_assert (!tab->kill_list[partition]);
#endif
} }
@ -704,9 +696,7 @@ find_replaceable_exprs (var_map map)
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
find_replaceable_in_bb (table, bb); find_replaceable_in_bb (table, bb);
#ifdef ENABLE_CHECKING gcc_checking_assert (bitmap_empty_p (table->partition_in_use));
gcc_assert (bitmap_empty_p (table->partition_in_use));
#endif
} }
ret = free_temp_expr_table (table); ret = free_temp_expr_table (table);

View File

@ -243,9 +243,7 @@ supports_overflow_infinity (const_tree type)
static inline tree static inline tree
make_overflow_infinity (tree val) make_overflow_infinity (tree val)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (val != NULL_TREE && CONSTANT_CLASS_P (val));
gcc_assert (val != NULL_TREE && CONSTANT_CLASS_P (val));
#endif
val = copy_node (val); val = copy_node (val);
TREE_OVERFLOW (val) = 1; TREE_OVERFLOW (val) = 1;
return val; return val;
@ -256,9 +254,7 @@ make_overflow_infinity (tree val)
static inline tree static inline tree
negative_overflow_infinity (tree type) negative_overflow_infinity (tree type)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (supports_overflow_infinity (type));
gcc_assert (supports_overflow_infinity (type));
#endif
return make_overflow_infinity (vrp_val_min (type)); return make_overflow_infinity (vrp_val_min (type));
} }
@ -267,9 +263,7 @@ negative_overflow_infinity (tree type)
static inline tree static inline tree
positive_overflow_infinity (tree type) positive_overflow_infinity (tree type)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (supports_overflow_infinity (type));
gcc_assert (supports_overflow_infinity (type));
#endif
return make_overflow_infinity (vrp_val_max (type)); return make_overflow_infinity (vrp_val_max (type));
} }
@ -332,9 +326,7 @@ avoid_overflow_infinity (tree val)
return vrp_val_max (TREE_TYPE (val)); return vrp_val_max (TREE_TYPE (val));
else else
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (vrp_val_is_min (val));
gcc_assert (vrp_val_is_min (val));
#endif
return vrp_val_min (TREE_TYPE (val)); return vrp_val_min (TREE_TYPE (val));
} }
} }
@ -4131,13 +4123,11 @@ register_new_assert_for (tree name, tree expr,
assert_locus_t n, loc, last_loc; assert_locus_t n, loc, last_loc;
basic_block dest_bb; basic_block dest_bb;
#if defined ENABLE_CHECKING gcc_checking_assert (bb == NULL || e == NULL);
gcc_assert (bb == NULL || e == NULL);
if (e == NULL) if (e == NULL)
gcc_assert (gimple_code (gsi_stmt (si)) != GIMPLE_COND gcc_checking_assert (gimple_code (gsi_stmt (si)) != GIMPLE_COND
&& gimple_code (gsi_stmt (si)) != GIMPLE_SWITCH); && gimple_code (gsi_stmt (si)) != GIMPLE_SWITCH);
#endif
/* Never build an assert comparing against an integer constant with /* Never build an assert comparing against an integer constant with
TREE_OVERFLOW set. This confuses our undefined overflow warning TREE_OVERFLOW set. This confuses our undefined overflow warning
@ -5059,10 +5049,9 @@ process_assert_insertions_for (tree name, assert_locus_t loc)
{ {
/* We have been asked to insert the assertion on an edge. This /* We have been asked to insert the assertion on an edge. This
is used only by COND_EXPR and SWITCH_EXPR assertions. */ is used only by COND_EXPR and SWITCH_EXPR assertions. */
#if defined ENABLE_CHECKING gcc_checking_assert (gimple_code (gsi_stmt (loc->si)) == GIMPLE_COND
gcc_assert (gimple_code (gsi_stmt (loc->si)) == GIMPLE_COND || (gimple_code (gsi_stmt (loc->si))
|| gimple_code (gsi_stmt (loc->si)) == GIMPLE_SWITCH); == GIMPLE_SWITCH));
#endif
gsi_insert_on_edge (loc->e, assert_stmt); gsi_insert_on_edge (loc->e, assert_stmt);
return true; return true;

View File

@ -1075,9 +1075,7 @@ dv_is_value_p (decl_or_value dv)
static inline tree static inline tree
dv_as_decl (decl_or_value dv) dv_as_decl (decl_or_value dv)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_is_decl_p (dv));
gcc_assert (dv_is_decl_p (dv));
#endif
return (tree) dv; return (tree) dv;
} }
@ -1085,9 +1083,7 @@ dv_as_decl (decl_or_value dv)
static inline rtx static inline rtx
dv_as_value (decl_or_value dv) dv_as_value (decl_or_value dv)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_is_value_p (dv));
gcc_assert (dv_is_value_p (dv));
#endif
return (rtx)dv; return (rtx)dv;
} }
@ -1136,9 +1132,7 @@ dv_from_decl (tree decl)
{ {
decl_or_value dv; decl_or_value dv;
dv = decl; dv = decl;
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_is_decl_p (dv));
gcc_assert (dv_is_decl_p (dv));
#endif
return dv; return dv;
} }
@ -1148,9 +1142,7 @@ dv_from_value (rtx value)
{ {
decl_or_value dv; decl_or_value dv;
dv = value; dv = value;
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_is_value_p (dv));
gcc_assert (dv_is_value_p (dv));
#endif
return dv; return dv;
} }
@ -2182,10 +2174,8 @@ variable_union (variable src, dataflow_set *set)
nnode->next = dnode; nnode->next = dnode;
dnode = nnode; dnode = nnode;
} }
#ifdef ENABLE_CHECKING
else if (r == 0) else if (r == 0)
gcc_assert (rtx_equal_p (dnode->loc, snode->loc)); gcc_checking_assert (rtx_equal_p (dnode->loc, snode->loc));
#endif
if (r >= 0) if (r >= 0)
snode = snode->next; snode = snode->next;
@ -2549,17 +2539,13 @@ find_loc_in_1pdv (rtx loc, variable var, htab_t vars)
if (!var) if (!var)
return NULL; return NULL;
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_onepart_p (var->dv));
gcc_assert (dv_onepart_p (var->dv));
#endif
if (!var->n_var_parts) if (!var->n_var_parts)
return NULL; return NULL;
#ifdef ENABLE_CHECKING gcc_checking_assert (var->var_part[0].offset == 0);
gcc_assert (var->var_part[0].offset == 0); gcc_checking_assert (loc != dv_as_opaque (var->dv));
gcc_assert (loc != dv_as_opaque (var->dv));
#endif
loc_code = GET_CODE (loc); loc_code = GET_CODE (loc);
for (node = var->var_part[0].loc_chain; node; node = node->next) for (node = var->var_part[0].loc_chain; node; node = node->next)
@ -2591,20 +2577,16 @@ find_loc_in_1pdv (rtx loc, variable var, htab_t vars)
while (node->next && GET_CODE (node->next->loc) == VALUE) while (node->next && GET_CODE (node->next->loc) == VALUE)
{ {
node = node->next; node = node->next;
#ifdef ENABLE_CHECKING gcc_checking_assert (!canon_value_cmp (node->loc,
gcc_assert (!canon_value_cmp (node->loc,
dv_as_value (var->dv))); dv_as_value (var->dv)));
#endif
if (loc == node->loc) if (loc == node->loc)
return node; return node;
} }
continue; continue;
} }
#ifdef ENABLE_CHECKING gcc_checking_assert (node == var->var_part[0].loc_chain);
gcc_assert (node == var->var_part[0].loc_chain); gcc_checking_assert (!node->next);
gcc_assert (!node->next);
#endif
dv = dv_from_value (node->loc); dv = dv_from_value (node->loc);
rvar = (variable) htab_find_with_hash (vars, dv, dv_htab_hash (dv)); rvar = (variable) htab_find_with_hash (vars, dv, dv_htab_hash (dv));
@ -2672,15 +2654,11 @@ intersect_loc_chains (rtx val, location_chain *dest, struct dfset_merge *dsm,
{ {
location_chain s2node; location_chain s2node;
#ifdef ENABLE_CHECKING gcc_checking_assert (dv_onepart_p (s2var->dv));
gcc_assert (dv_onepart_p (s2var->dv));
#endif
if (s2var->n_var_parts) if (s2var->n_var_parts)
{ {
#ifdef ENABLE_CHECKING gcc_checking_assert (s2var->var_part[0].offset == 0);
gcc_assert (s2var->var_part[0].offset == 0);
#endif
s2node = s2var->var_part[0].loc_chain; s2node = s2var->var_part[0].loc_chain;
for (; s1node && s2node; for (; s1node && s2node;
@ -2829,10 +2807,8 @@ loc_cmp (rtx x, rtx y)
if (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x)) if (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
< DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y))) < DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y)))
return -1; return -1;
#ifdef ENABLE_CHECKING gcc_checking_assert (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
gcc_assert (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
> DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y))); > DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y)));
#endif
return 1; return 1;
} }
@ -3592,10 +3568,9 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash); dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash);
gcc_assert (*dstslot == dvar); gcc_assert (*dstslot == dvar);
canonicalize_values_star (dstslot, dst); canonicalize_values_star (dstslot, dst);
#ifdef ENABLE_CHECKING gcc_checking_assert (dstslot
gcc_assert (dstslot == shared_hash_find_slot_noinsert_1 (dst->vars,
== shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash)); dv, dvhash));
#endif
dvar = (variable)*dstslot; dvar = (variable)*dstslot;
} }
else else
@ -3660,11 +3635,9 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash); dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash);
gcc_assert (*dstslot == dvar); gcc_assert (*dstslot == dvar);
canonicalize_values_star (dstslot, dst); canonicalize_values_star (dstslot, dst);
#ifdef ENABLE_CHECKING gcc_checking_assert (dstslot
gcc_assert (dstslot
== shared_hash_find_slot_noinsert_1 (dst->vars, == shared_hash_find_slot_noinsert_1 (dst->vars,
dv, dvhash)); dv, dvhash));
#endif
dvar = (variable)*dstslot; dvar = (variable)*dstslot;
} }
} }