/* We are going to use the operand cache API, such as
SET_USE, SET_DEF, and FOR_EACH_IMM_USE_FAST. The operand
cache for each statement should be up-to-date. */
- gcc_assert (!gimple_modified_p (stmt));
+ gcc_checking_assert (!gimple_modified_p (stmt));
set_rewrite_uses (stmt, false);
set_register_defs (stmt, false);
}
static void
mark_block_for_update (basic_block bb)
{
- gcc_assert (blocks_to_update != NULL);
+ gcc_checking_assert (blocks_to_update != NULL);
if (!bitmap_set_bit (blocks_to_update, bb->index))
return;
initialize_flags_in_bb (bb);
add_new_name_mapping (tree new_tree, tree old)
{
/* OLD and NEW_TREE must be different SSA names for the same symbol. */
- gcc_assert (new_tree != old && SSA_NAME_VAR (new_tree) == SSA_NAME_VAR (old));
+ gcc_checking_assert (new_tree != old
+ && SSA_NAME_VAR (new_tree) == SSA_NAME_VAR (old));
/* We may need to grow NEW_SSA_NAMES and OLD_SSA_NAMES because our
caller may have created new names since the set was created. */
form, force an operand scan on every statement. */
update_stmt (stmt);
- gcc_assert (blocks_to_update == NULL);
+ gcc_checking_assert (blocks_to_update == NULL);
set_register_defs (stmt, false);
set_rewrite_uses (stmt, false);
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
{
tree sym = USE_FROM_PTR (use_p);
- gcc_assert (DECL_P (sym));
+ gcc_checking_assert (DECL_P (sym));
set_rewrite_uses (stmt, true);
}
if (rewrite_uses_p (stmt))
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
{
tree sym = USE_FROM_PTR (use_p);
- gcc_assert (DECL_P (sym));
+ gcc_checking_assert (DECL_P (sym));
if (!bitmap_bit_p (kills, DECL_UID (sym)))
set_livein_block (sym, bb);
set_rewrite_uses (stmt, true);
each def to the set of killed symbols. */
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS)
{
- gcc_assert (DECL_P (def));
+ gcc_checking_assert (DECL_P (def));
set_def_block (def, bb, false);
bitmap_set_bit (kills, DECL_UID (def));
set_register_defs (stmt, true);
gimple phi;
basic_block bb;
bitmap_iterator bi;
- struct def_blocks_d *def_map;
-
- def_map = find_def_blocks_for (var);
- gcc_assert (def_map);
+ struct def_blocks_d *def_map = find_def_blocks_for (var);
/* Remove the blocks where we already have PHI nodes for VAR. */
bitmap_and_compl_into (phi_insertion_points, def_map->phi_blocks);
edge_iterator ei;
tree new_lhs;
- gcc_assert (update_p);
+ gcc_checking_assert (update_p);
new_lhs = duplicate_ssa_name (var, NULL);
phi = create_phi_node (new_lhs, bb);
add_new_name_mapping (new_lhs, var);
{
tree tracked_var;
- gcc_assert (DECL_P (var));
+ gcc_checking_assert (DECL_P (var));
phi = create_phi_node (var, bb);
tracked_var = target_for_debug_bind (var);
{
tree var = USE_FROM_PTR (use_p), def;
common_info_p info = get_common_info (var);
- gcc_assert (DECL_P (var));
+ gcc_checking_assert (DECL_P (var));
def = info->current_def;
if (!def)
{
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
{
tree var = USE_FROM_PTR (use_p);
- gcc_assert (DECL_P (var));
+ gcc_checking_assert (DECL_P (var));
SET_USE (use_p, get_reaching_def (var));
}
}
tree name;
tree tracked_var;
- gcc_assert (DECL_P (var));
+ gcc_checking_assert (DECL_P (var));
if (gimple_clobber_p (stmt)
&& is_gimple_reg (var))
{
/* If we rewrite a DECL into SSA form then drop its
clobber stmts and replace uses with a new default def. */
- gcc_assert (TREE_CODE (var) == VAR_DECL
- && !gimple_vdef (stmt));
+ gcc_checking_assert (TREE_CODE (var) == VAR_DECL
+ && !gimple_vdef (stmt));
gsi_replace (si, gimple_build_nop (), true);
register_new_def (get_or_create_ssa_default_def (cfun, var), var);
break;
FOR_EACH_EDGE (e, ei, bb->succs)
if (!(e->flags & EDGE_EH))
{
- gcc_assert (!ef);
+ gcc_checking_assert (!ef);
ef = e;
}
/* If there are other predecessors to ef->dest, then
tree arg, lhs_sym, reaching_def = NULL;
use_operand_p arg_p;
- gcc_assert (rewrite_uses_p (phi));
+ gcc_checking_assert (rewrite_uses_p (phi));
arg_p = PHI_ARG_DEF_PTR_FROM_EDGE (phi, e);
arg = USE_FROM_PTR (arg_p);
/* Step 2. Rewrite every variable used in each statement in the block. */
if (TEST_BIT (interesting_blocks, bb->index))
{
- gcc_assert (bitmap_bit_p (blocks_to_update, bb->index));
+ gcc_checking_assert (bitmap_bit_p (blocks_to_update, bb->index));
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
rewrite_update_stmt (gsi_stmt (gsi), gsi);
}
static void
mark_def_interesting (tree var, gimple stmt, basic_block bb, bool insert_phi_p)
{
- gcc_assert (bitmap_bit_p (blocks_to_update, bb->index));
+ gcc_checking_assert (bitmap_bit_p (blocks_to_update, bb->index));
set_register_defs (stmt, true);
if (insert_phi_p)
gimple stmt;
basic_block bb;
- gcc_assert (names_to_release == NULL
- || !bitmap_bit_p (names_to_release, SSA_NAME_VERSION (name)));
+ gcc_checking_assert (names_to_release == NULL
+ || !bitmap_bit_p (names_to_release,
+ SSA_NAME_VERSION (name)));
stmt = SSA_NAME_DEF_STMT (name);
bb = gimple_bb (stmt);
if (bb)
{
- gcc_assert (bb->index < last_basic_block);
+ gcc_checking_assert (bb->index < last_basic_block);
mark_block_for_update (bb);
mark_def_interesting (name, stmt, bb, insert_phi_p);
}
else
{
/* Otherwise, do not prune the IDF for VAR. */
- gcc_assert (update_flags == TODO_update_ssa_full_phi);
+ gcc_checking_assert (update_flags == TODO_update_ssa_full_phi);
bitmap_copy (pruned_idf, idf);
}
}