+2004-09-18 Jan Hubicka <jh@suse.cz>
+
+ * tree-into-ssa.c (rewrite_ssa_into_ssa): Expect ssa_name to return
+ NULL.
+ * tree-ssa-alias.c (init_alias_info): Likewise.
+ * tree-ssa.c (verify_flow_sensitive_alias_info): Likewise.
+ (verify_ssa): Likewise.
+ * tree-ssanames.c (make_ssa_name): Clear out ssa_names arrays.
+
2004-09-18 Jan Hubicka <jh@suse.cz>
* i386.c (legitimize_pic_address): Fix splitting of PLUS with
sbitmap_free (mark_def_sites_global_data.kills);
for (i = 1; i < num_ssa_names; i++)
- set_current_def (ssa_name (i), NULL_TREE);
+ if (ssa_name (i))
+ set_current_def (ssa_name (i), NULL_TREE);
/* Insert PHI nodes at dominance frontiers of definition blocks. */
insert_phi_nodes (dfs, to_rename);
for (i = 1; i < num_ssa_names; i++)
{
name = ssa_name (i);
- if (!SSA_NAME_AUX (name))
+ if (!name || !SSA_NAME_AUX (name))
continue;
free (SSA_NAME_AUX (name));
{
tree name = ssa_name (i);
- if (!POINTER_TYPE_P (TREE_TYPE (name)))
+ if (!name || !POINTER_TYPE_P (TREE_TYPE (name)))
continue;
if (SSA_NAME_PTR_INFO (name))
struct ptr_info_def *pi;
ptr = ssa_name (i);
+ if (!ptr)
+ continue;
ann = var_ann (SSA_NAME_VAR (ptr));
pi = SSA_NAME_PTR_INFO (ptr);
size_t j;
for (j = i + 1; j < num_ssa_names; j++)
- {
- tree ptr2 = ssa_name (j);
- struct ptr_info_def *pi2 = SSA_NAME_PTR_INFO (ptr2);
-
- if (!TREE_VISITED (ptr2) || !POINTER_TYPE_P (TREE_TYPE (ptr2)))
- continue;
-
- if (pi2
- && pi2->name_mem_tag
- && pi2->pt_vars
- && bitmap_first_set_bit (pi2->pt_vars) >= 0
- && pi->name_mem_tag != pi2->name_mem_tag
- && bitmap_equal_p (pi->pt_vars, pi2->pt_vars))
- {
- error ("Two pointers with different name tags and identical points-to sets");
- debug_variable (ptr2);
- goto err;
- }
- }
+ if (ssa_name (j))
+ {
+ tree ptr2 = ssa_name (j);
+ struct ptr_info_def *pi2 = SSA_NAME_PTR_INFO (ptr2);
+
+ if (!TREE_VISITED (ptr2) || !POINTER_TYPE_P (TREE_TYPE (ptr2)))
+ continue;
+
+ if (pi2
+ && pi2->name_mem_tag
+ && pi2->pt_vars
+ && bitmap_first_set_bit (pi2->pt_vars) >= 0
+ && pi->name_mem_tag != pi2->name_mem_tag
+ && bitmap_equal_p (pi->pt_vars, pi2->pt_vars))
+ {
+ error ("Two pointers with different name tags and identical points-to sets");
+ debug_variable (ptr2);
+ goto err;
+ }
+ }
}
}
/* Keep track of SSA names present in the IL. */
for (i = 1; i < num_ssa_names; i++)
- TREE_VISITED (ssa_name (i)) = 0;
+ if (ssa_name (i))
+ TREE_VISITED (ssa_name (i)) = 0;
calculate_dominance_info (CDI_DOMINATORS);
memset (t, 0, tree_size (t));
TREE_SET_CODE (t, SSA_NAME);
SSA_NAME_VERSION (t) = save_version;
+ gcc_assert (ssa_name (save_version) == NULL);
+ VARRAY_TREE (ssa_names, save_version) = t;
}
else
{
defining statement. */
if (! SSA_NAME_IN_FREE_LIST (var))
{
+ VARRAY_TREE (ssa_names, SSA_NAME_VERSION (var)) = NULL;
SSA_NAME_IN_FREE_LIST (var) = 1;
TREE_CHAIN (var) = free_ssanames;
free_ssanames = var;