bitmap_and_compl_into, bitmap_compl_and_into, bitmap_ior,
bitmap_ior_into, bitmap_xor, bitmap_xor_into,
bitmap_ior_and_compl, bitmap_ior_and_compl): Turn internal datastructure
checks into checking asserts.
* rtlanal.c (find_reg_note): Use gcc_checking_assert.
* tree-ssa-sccvn.c (VN_INFO): Likewise.
* df-scan.c (df_reorganize_refs_by_reg_by_reg, df_install_ref,
df_ref_create_structure): Likewise.
* alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc,
pool_free): Use gcc_checking_assert.
* alias.c (get_alias_set): Likewise.
* var-tracking.c (variable_htab_free, shared_hash_copy,
canonicalize_values_mark, variable_merge_over_cur): Likewise.
* lto-streamer.c (bp_unpack_value): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160681
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-13 Jan Hubicka <jh@suse.cz>
+
+ * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,
+ bitmap_and_compl_into, bitmap_compl_and_into, bitmap_ior,
+ bitmap_ior_into, bitmap_xor, bitmap_xor_into,
+ bitmap_ior_and_compl, bitmap_ior_and_compl): Turn internal datastructure
+ checks into checking asserts.
+ * rtlanal.c (find_reg_note): Use gcc_checking_assert.
+ * tree-ssa-sccvn.c (VN_INFO): Likewise.
+ * df-scan.c (df_reorganize_refs_by_reg_by_reg, df_install_ref,
+ df_ref_create_structure): Likewise.
+ * alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc,
+ pool_free): Use gcc_checking_assert.
+ * alias.c (get_alias_set): Likewise.
+ * var-tracking.c (variable_htab_free, shared_hash_copy,
+ canonicalize_values_mark, variable_merge_over_cur): Likewise.
+ * lto-streamer.c (bp_unpack_value): Likewise.
+
2010-06-13 Richard Guenther <rguenther@suse.de>
* lto-streamer-in.c (lto_input_ts_type_tree_pointers):
t = TYPE_CANONICAL (t);
/* Canonical types shouldn't form a tree nor should the canonical
type require structural equality checks. */
- gcc_assert (!TYPE_STRUCTURAL_EQUALITY_P (t) && TYPE_CANONICAL (t) == t);
+ gcc_checking_assert (!TYPE_STRUCTURAL_EQUALITY_P (t) && TYPE_CANONICAL (t) == t);
/* If this is a type with a known alias set, return it. */
if (TYPE_ALIAS_SET_KNOWN_P (t))
regno = REGNO (dest);
- gcc_assert (regno < VEC_length (rtx, reg_base_value));
+ gcc_checking_assert (regno < VEC_length (rtx, reg_base_value));
/* If this spans multiple hard registers, then we must indicate that every
register has an unusable value. */
struct alloc_pool_descriptor *desc;
#endif
- gcc_assert (name);
+ gcc_checking_assert (name);
/* Make size large enough to store the list header. */
if (size < sizeof (alloc_pool_list))
#endif
/* Um, we can't really allocate 0 elements per block. */
- gcc_assert (num);
+ gcc_checking_assert (num);
/* Allocate memory for the pool structure. */
pool = XNEW (struct alloc_pool_def);
struct alloc_pool_descriptor *desc = alloc_pool_descriptor (pool->name);
#endif
- gcc_assert (pool);
+ gcc_checking_assert (pool);
/* Free each block allocated to the pool. */
for (block = pool->block_list; block != NULL; block = next_block)
desc->peak = desc->current;
#endif
- gcc_assert (pool);
+ gcc_checking_assert (pool);
/* If there are no more free elements, make some more!. */
if (!pool->returned_free_list)
struct alloc_pool_descriptor *desc = alloc_pool_descriptor (pool->name);
#endif
- gcc_assert (ptr);
#ifdef ENABLE_CHECKING
- /* Check whether the PTR was allocated from POOL. */
- gcc_assert (pool->id == ALLOCATION_OBJECT_PTR_FROM_USER_PTR (ptr)->id);
+ gcc_assert (ptr
+ /* Check if we free more than we allocated, which is Bad (TM). */
+ && pool->elts_free < pool->elts_allocated
+ /* Check whether the PTR was allocated from POOL. */
+ && pool->id == ALLOCATION_OBJECT_PTR_FROM_USER_PTR (ptr)->id);
memset (ptr, 0xaf, pool->elt_size - offsetof (allocation_object, u.data));
/* Mark the element to be free. */
ALLOCATION_OBJECT_PTR_FROM_USER_PTR (ptr)->id = 0;
#else
- /* Check if we free more than we allocated, which is Bad (TM). */
- gcc_assert (pool->elts_free < pool->elts_allocated);
#endif
header = (alloc_pool_list) ptr;
/* Ensure that dst->current is valid. */
dst->current = dst->first;
bitmap_elt_clear_from (dst, dst_elt);
- gcc_assert (!dst->current == !dst->first);
+ gcc_checking_assert (!dst->current == !dst->first);
if (dst->current)
dst->indx = dst->current->indx;
}
}
}
bitmap_elt_clear_from (a, a_elt);
- gcc_assert (!a->current == !a->first
- && (!a->current || a->indx == a->current->indx));
+ gcc_checking_assert (!a->current == !a->first
+ && (!a->current || a->indx == a->current->indx));
}
changed = true;
bitmap_elt_clear_from (dst, dst_elt);
}
- gcc_assert (!dst->current == !dst->first);
+ gcc_checking_assert (!dst->current == !dst->first);
if (dst->current)
dst->indx = dst->current->indx;
b_elt = b_elt->next;
}
}
- gcc_assert (!a->current == !a->first
- && (!a->current || a->indx == a->current->indx));
+ gcc_checking_assert (!a->current == !a->first
+ && (!a->current || a->indx == a->current->indx));
return changed != 0;
}
b_elt = b_elt->next;
}
}
- gcc_assert (!a->current == !a->first
- && (!a->current || a->indx == a->current->indx));
+ gcc_checking_assert (!a->current == !a->first
+ && (!a->current || a->indx == a->current->indx));
return;
}
changed = true;
bitmap_elt_clear_from (dst, dst_elt);
}
- gcc_assert (!dst->current == !dst->first);
+ gcc_checking_assert (!dst->current == !dst->first);
if (dst->current)
dst->indx = dst->current->indx;
return changed;
a_elt = *a_prev_pnext;
}
- gcc_assert (!a->current == !a->first);
+ gcc_checking_assert (!a->current == !a->first);
if (a->current)
a->indx = a->current->indx;
return changed;
/* Ensure that dst->current is valid. */
dst->current = dst->first;
bitmap_elt_clear_from (dst, dst_elt);
- gcc_assert (!dst->current == !dst->first);
+ gcc_checking_assert (!dst->current == !dst->first);
if (dst->current)
dst->indx = dst->current->indx;
}
a_elt = next;
}
}
- gcc_assert (!a->current == !a->first);
+ gcc_checking_assert (!a->current == !a->first);
if (a->current)
a->indx = a->current->indx;
}
changed = true;
bitmap_elt_clear_from (dst, dst_elt);
}
- gcc_assert (!dst->current == !dst->first);
+ gcc_checking_assert (!dst->current == !dst->first);
if (dst->current)
dst->indx = dst->current->indx;
}
done:
- gcc_assert (!a->current == !a->first);
+ gcc_checking_assert (!a->current == !a->first);
if (a->current)
a->indx = a->current->indx;
return changed;
DF_REF_ID (ref) = offset++;
count++;
ref = DF_REF_NEXT_REG (ref);
- gcc_assert (offset < ref_info->refs_size);
+ gcc_checking_assert (offset < ref_info->refs_size);
}
}
if (include_uses)
DF_REF_ID (ref) = offset++;
count++;
ref = DF_REF_NEXT_REG (ref);
- gcc_assert (offset < ref_info->refs_size);
+ gcc_checking_assert (offset < ref_info->refs_size);
}
}
if (include_eq_uses)
DF_REF_ID (ref) = offset++;
count++;
ref = DF_REF_NEXT_REG (ref);
- gcc_assert (offset < ref_info->refs_size);
+ gcc_checking_assert (offset < ref_info->refs_size);
}
}
ref_info->count[regno] = count;
df->hard_regs_live_count[regno]++;
}
- gcc_assert (DF_REF_NEXT_REG (this_ref) == NULL
- && DF_REF_PREV_REG (this_ref) == NULL);
+ gcc_checking_assert (DF_REF_NEXT_REG (this_ref) == NULL
+ && DF_REF_PREV_REG (this_ref) == NULL);
DF_REF_NEXT_REG (this_ref) = head;
{
case DF_REF_BASE:
this_ref = (df_ref) pool_alloc (problem_data->ref_base_pool);
- gcc_assert (loc == NULL);
+ gcc_checking_assert (loc == NULL);
break;
case DF_REF_ARTIFICIAL:
this_ref = (df_ref) pool_alloc (problem_data->ref_artificial_pool);
this_ref->artificial_ref.bb = bb;
- gcc_assert (loc == NULL);
+ gcc_checking_assert (loc == NULL);
break;
case DF_REF_REGULAR:
this_ref = (df_ref) pool_alloc (problem_data->ref_regular_pool);
this_ref->regular_ref.loc = loc;
- gcc_assert (loc);
+ gcc_checking_assert (loc);
break;
case DF_REF_EXTRACT:
DF_REF_EXTRACT_OFFSET (this_ref) = offset;
DF_REF_EXTRACT_MODE (this_ref) = mode;
this_ref->regular_ref.loc = loc;
- gcc_assert (loc);
+ gcc_checking_assert (loc);
break;
}
{
unsigned int regno;
- gcc_assert (REG_P (reg) || GET_CODE (reg) == SUBREG);
+ gcc_checking_assert (REG_P (reg) || GET_CODE (reg) == SUBREG);
regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg);
if (regno < FIRST_PSEUDO_REGISTER)
unsigned ix;
/* We cannot decode more bits than BITS_PER_BITPACK_WORD. */
- gcc_assert (nbits > 0 && nbits <= BITS_PER_BITPACK_WORD);
+ gcc_checking_assert (nbits > 0 && nbits <= BITS_PER_BITPACK_WORD);
/* Compute which word contains the next NBITS. */
ix = bp_get_next_word (bp, nbits);
{
rtx link;
- gcc_assert (insn);
+ gcc_checking_assert (insn);
/* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN. */
if (! INSN_P (insn))
{
vn_ssa_aux_t res = VEC_index (vn_ssa_aux_t, vn_ssa_aux_table,
SSA_NAME_VERSION (name));
- gcc_assert (res);
+ gcc_checking_assert (res);
return res;
}
variable var = (variable) elem;
location_chain node, next;
- gcc_assert (var->refcount > 0);
+ gcc_checking_assert (var->refcount > 0);
var->refcount--;
if (var->refcount > 0)
static void
shared_hash_destroy (shared_hash vars)
{
- gcc_assert (vars->refcount > 0);
+ gcc_checking_assert (vars->refcount > 0);
if (--vars->refcount == 0)
{
htab_delete (vars->htab);
if (!dv_is_value_p (dv))
return 1;
- gcc_assert (var->n_var_parts == 1);
+ gcc_checking_assert (var->n_var_parts == 1);
val = dv_as_value (dv);
if (!dv_onepart_p (dv))
return 1;
- gcc_assert (var->n_var_parts == 1);
+ gcc_checking_assert (var->n_var_parts == 1);
if (dv_is_value_p (dv))
{
/* Variable may have been unshared. */
var = (variable)*slot;
- gcc_assert (var->n_var_parts && var->var_part[0].loc_chain->loc == cval
- && var->var_part[0].loc_chain->next == NULL);
+ gcc_checking_assert (var->n_var_parts && var->var_part[0].loc_chain->loc == cval
+ && var->var_part[0].loc_chain->next == NULL);
if (VALUE_RECURSED_INTO (cval))
goto restart_with_cval;
/* If the incoming onepart variable has an empty location list, then
the intersection will be just as empty. For other variables,
it's always union. */
- gcc_assert (s1var->n_var_parts
- && s1var->var_part[0].loc_chain);
+ gcc_checking_assert (s1var->n_var_parts
+ && s1var->var_part[0].loc_chain);
if (!onepart)
return variable_union (s1var, dst);
- gcc_assert (s1var->n_var_parts == 1
- && s1var->var_part[0].offset == 0);
+ gcc_checking_assert (s1var->n_var_parts == 1
+ && s1var->var_part[0].offset == 0);
dvhash = dv_htab_hash (dv);
if (dv_is_value_p (dv))