diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2006-12-04 19:07:05 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2006-12-04 19:07:05 +0000 |
commit | c58936b6b75bfea1b486a7040081e423e58a56de (patch) | |
tree | 8dbfc56117f5c8e2683fa7f0f2fb59efb7c301b4 /gcc/tree-ssa.c | |
parent | 2c05d05ede8e14d8e709b172e83004c53fb30187 (diff) | |
download | gcc-c58936b6b75bfea1b486a7040081e423e58a56de.zip gcc-c58936b6b75bfea1b486a7040081e423e58a56de.tar.gz gcc-c58936b6b75bfea1b486a7040081e423e58a56de.tar.bz2 |
tree-ssa-alias.c (compute_may_aliases): Compute flow sensitive before flow insensitive.
2006-12-04 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-alias.c (compute_may_aliases):
Compute flow sensitive before flow insensitive.
(compute_flow_sensitive_aliasing): Don't try to add
a symbol memory tag to itself.
* alias.h (alias_set_subset_of): New prototype.
* alias.c (alias_set_subset_of): New function.
* tree-ssa-structalias.c: Update comments.
(struct variable_info): Add finished_solution.
(new_varinfo): Set finished solution to NULL.
(var_escaped_vars): Remove.
(escaped_vars_tree): Remove.
(escaped_vars_id): Remove.
(nonlocal_vars_id): Remove.
(constraint_expr_type): Add INCLUDES.
(graph_size): Removed.
(dump_constraint): Support INCLUDES.
(build_constraint_graph): Ditto.
(collapse_nodes): Add merge_solutions argument.
Don't merge attributes.
(process_unification_queue): Just use collapse_nodes.
(perform_var_substitution): Update call to collapse_nodes.
(get_constraint_exp_from_ssa_var): Use INCLUDES.
(process_constraint): Fix non-field sensitive handling
Handle includes.
(get_constraint_for): Use INCLUDES.
(make_constraint_from_anything): Renamed from
make_constraint_from_escaped.
(make_constraint_to_escaped): Removed.
(find_global_initializers): Removed.
(create_variable_info_for): Do not make constraints to escaped
vars anymore.
(dump_solution_for_var): Don't print out the equivalent points-to
sets, just use the name of the variable it shares it with.
(intra_create_variable_infos): Use INCLUDES.
Change nonlocal variable sets to anything sets.
(init_base_vars): Remove escaped_vars and nonlocal_var
initialization.
(find_escape_constraints): Removed.
(delete_points_to_sets): Remove dead code.
(used_smt_calculated): New variable.
(set_used_smts): New function.
(merge_smts_into): New function.
(find_what_p_points_to): Modify to use SMTs.
(create_nonlocal_var): Remove.
* tree-ssa-operands.c (access_can_touch_variable): Remove
reference to nonlocal_all.
* tree-ssa.c (verify_name_tags): Remove.
From-SVN: r119502
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 4914510..4704271 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -488,131 +488,6 @@ err: internal_error ("verify_flow_sensitive_alias_info failed"); } -DEF_VEC_P (bitmap); -DEF_VEC_ALLOC_P (bitmap,heap); - -/* Verify that all name tags have different points to sets. - This algorithm takes advantage of the fact that every variable with the - same name tag must have the same points-to set. - So we check a single variable for each name tag, and verify that its - points-to set is different from every other points-to set for other name - tags. - - Additionally, given a pointer P_i with name tag NMT and symbol tag - SMT, this function verified the alias set of SMT is a superset of - the alias set of NMT. */ - -static void -verify_name_tags (void) -{ - size_t i; - size_t j; - bitmap first, second; - VEC(tree,heap) *name_tag_reps = NULL; - VEC(bitmap,heap) *pt_vars_for_reps = NULL; - bitmap type_aliases = BITMAP_ALLOC (NULL); - - /* First we compute the name tag representatives and their points-to sets. */ - for (i = 0; i < num_ssa_names; i++) - { - struct ptr_info_def *pi; - tree smt, ptr = ssa_name (i); - - if (ptr == NULL_TREE) - continue; - - pi = SSA_NAME_PTR_INFO (ptr); - - if (!TREE_VISITED (ptr) - || !POINTER_TYPE_P (TREE_TYPE (ptr)) - || !pi - || !pi->name_mem_tag - || TREE_VISITED (pi->name_mem_tag)) - continue; - - TREE_VISITED (pi->name_mem_tag) = 1; - - if (pi->pt_vars == NULL) - continue; - - VEC_safe_push (tree, heap, name_tag_reps, ptr); - VEC_safe_push (bitmap, heap, pt_vars_for_reps, pi->pt_vars); - - /* Verify that alias set of PTR's symbol tag is a superset of the - alias set of PTR's name tag. */ - smt = var_ann (SSA_NAME_VAR (ptr))->symbol_mem_tag; - if (smt) - { - size_t i; - VEC(tree,gc) *aliases = var_ann (smt)->may_aliases; - tree alias; - - bitmap_clear (type_aliases); - for (i = 0; VEC_iterate (tree, aliases, i, alias); i++) - bitmap_set_bit (type_aliases, DECL_UID (alias)); - - /* When grouping, we may have added PTR's symbol tag into the - alias set of PTR's name tag. To prevent a false - positive, pretend that SMT is in its own alias set. */ - bitmap_set_bit (type_aliases, DECL_UID (smt)); - - if (bitmap_equal_p (type_aliases, pi->pt_vars)) - continue; - - if (!bitmap_intersect_compl_p (type_aliases, pi->pt_vars)) - { - error ("alias set of a pointer's symbol tag should be a superset of the corresponding name tag"); - debug_variable (smt); - debug_variable (pi->name_mem_tag); - goto err; - } - } - } - - /* Now compare all the representative bitmaps with all other representative - bitmaps, to verify that they are all different. */ - for (i = 0; VEC_iterate (bitmap, pt_vars_for_reps, i, first); i++) - { - for (j = i + 1; VEC_iterate (bitmap, pt_vars_for_reps, j, second); j++) - { - if (bitmap_equal_p (first, second)) - { - error ("two different pointers with identical points-to sets but different name tags"); - debug_variable (VEC_index (tree, name_tag_reps, j)); - goto err; - } - } - } - - /* Lastly, clear out the visited flags. */ - for (i = 0; i < num_ssa_names; i++) - { - if (ssa_name (i)) - { - tree ptr = ssa_name (i); - struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); - if (!TREE_VISITED (ptr) - || !POINTER_TYPE_P (TREE_TYPE (ptr)) - || !pi - || !pi->name_mem_tag) - continue; - TREE_VISITED (pi->name_mem_tag) = 0; - } - } - - /* We do not have to free the bitmaps or trees in the vectors, as - they are not owned by us. */ - VEC_free (bitmap, heap, pt_vars_for_reps); - VEC_free (tree, heap, name_tag_reps); - BITMAP_FREE (type_aliases); - return; - -err: - debug_variable (VEC_index (tree, name_tag_reps, i)); - internal_error ("verify_name_tags failed"); -} - - /* Verify the consistency of call clobbering information. */ static void verify_call_clobbering (void) @@ -659,7 +534,6 @@ static void verify_alias_info (void) { verify_flow_sensitive_alias_info (); - verify_name_tags (); verify_call_clobbering (); verify_flow_insensitive_alias_info (); } |