internal_error ("verify_call_clobbering failed");
}
+
+/* Verify invariants in memory partitions. */
+
+static void
+verify_memory_partitions (void)
+{
+ unsigned i;
+ tree mpt;
+ VEC(tree,heap) *mpt_table = gimple_ssa_operands (cfun)->mpt_table;
+ struct pointer_set_t *partitioned_syms = pointer_set_create ();
+
+ for (i = 0; VEC_iterate (tree, mpt_table, i, mpt); i++)
+ {
+ unsigned j;
+ bitmap_iterator bj;
+
+ if (MPT_SYMBOLS (mpt) == NULL)
+ {
+ error ("Memory partitions should have at least one symbol");
+ debug_variable (mpt);
+ goto err;
+ }
+
+ EXECUTE_IF_SET_IN_BITMAP (MPT_SYMBOLS (mpt), 0, j, bj)
+ {
+ tree var = referenced_var (j);
+ if (pointer_set_insert (partitioned_syms, var))
+ {
+ error ("Partitioned symbols should belong to exactly one "
+ "partition");
+ debug_variable (var);
+ goto err;
+ }
+ }
+ }
+
+ pointer_set_destroy (partitioned_syms);
+
+ return;
+
+err:
+ internal_error ("verify_memory_partitions failed");
+}
+
+
/* Verify the consistency of aliasing information. */
static void
verify_flow_sensitive_alias_info ();
verify_call_clobbering ();
verify_flow_insensitive_alias_info ();
+ verify_memory_partitions ();
}
basic_block *definition_block = XCNEWVEC (basic_block, num_ssa_names);
ssa_op_iter iter;
tree op;
- enum dom_state orig_dom_state = dom_computed[CDI_DOMINATORS];
+ enum dom_state orig_dom_state = dom_info_state (CDI_DOMINATORS);
bitmap names_defined_in_bb = BITMAP_ALLOC (NULL);
gcc_assert (!need_ssa_update_p ());
if (orig_dom_state == DOM_NONE)
free_dominance_info (CDI_DOMINATORS);
else
- dom_computed[CDI_DOMINATORS] = orig_dom_state;
+ set_dom_info_availability (CDI_DOMINATORS, orig_dom_state);
BITMAP_FREE (names_defined_in_bb);
timevar_pop (TV_TREE_SSA_VERIFY);
void
init_tree_ssa (void)
{
- cfun->gimple_df = ggc_alloc_cleared (sizeof (struct gimple_df));
+ cfun->gimple_df = GGC_CNEW (struct gimple_df);
cfun->gimple_df->referenced_vars = htab_create_ggc (20, int_tree_map_hash,
int_tree_map_eq, NULL);
cfun->gimple_df->default_defs = htab_create_ggc (20, int_tree_map_hash,
gcc_assert (!need_ssa_update_p ());
}
cfun->gimple_df->aliases_computed_p = false;
+ delete_mem_ref_stats (cfun);
cfun->gimple_df = NULL;
}
else if (INTEGRAL_TYPE_P (inner_type)
&& INTEGRAL_TYPE_P (outer_type)
&& TYPE_UNSIGNED (inner_type) == TYPE_UNSIGNED (outer_type)
- && TYPE_PRECISION (inner_type) == TYPE_PRECISION (outer_type)
- && simple_cst_equal (TYPE_MAX_VALUE (inner_type), TYPE_MAX_VALUE (outer_type))
- && simple_cst_equal (TYPE_MIN_VALUE (inner_type), TYPE_MIN_VALUE (outer_type)))
+ && TYPE_PRECISION (inner_type) == TYPE_PRECISION (outer_type))
{
+ tree min_inner = fold_convert (outer_type, TYPE_MIN_VALUE (inner_type));
+ tree max_inner = fold_convert (outer_type, TYPE_MAX_VALUE (inner_type));
bool first_boolean = (TREE_CODE (inner_type) == BOOLEAN_TYPE);
bool second_boolean = (TREE_CODE (outer_type) == BOOLEAN_TYPE);
- if (first_boolean == second_boolean)
+ if (simple_cst_equal (max_inner, TYPE_MAX_VALUE (outer_type))
+ && simple_cst_equal (min_inner, TYPE_MIN_VALUE (outer_type))
+ && first_boolean == second_boolean)
return true;
}
locus = (context != NULL && EXPR_HAS_LOCATION (context)
? EXPR_LOCUS (context)
: &DECL_SOURCE_LOCATION (var));
- warning (0, gmsgid, locus, var);
+ warning (OPT_Wuninitialized, gmsgid, locus, var);
xloc = expand_location (*locus);
floc = expand_location (DECL_SOURCE_LOCATION (cfun->decl));
if (xloc.file != floc.file