2006-10-19 Daniel Berlin <dberlin@dberlin.org>
commit499be8ef6be39e70ee2de807ac4ddd81b5827c0a
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2006 23:05:53 +0000 (19 23:05 +0000)
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2006 23:05:53 +0000 (19 23:05 +0000)
tree3bf6deb6c3a38a049a9a686d850d1314378e5d6d
parent81499f286c30744e70b97127a45e6995cfe1027d
2006-10-19  Daniel Berlin  <dberlin@dberlin.org>

Fix PR tree-optimization/28778
Fix PR tree-optimization/29156
Fix PR tree-optimization/29415
* tree.h (DECL_PTA_ARTIFICIAL): New macro.
(tree_decl_with_vis): Add artificial_pta_var flag.
* tree-ssa-alias.c (is_escape_site): Remove alias info argument,
pushed into callers.
* tree-ssa-structalias.c (nonlocal_for_type): New variable.
(nonlocal_all): Ditto.
(struct variable_info): Add directly_dereferenced member.
(var_escaped_vars): New variable.
(escaped_vars_tree): Ditto.
(escaped_vars_id): Ditto.
(nonlocal_vars_id): Ditto.
(new_var_info): Set directly_dereferenced.
(graph_size): New variable
(build_constraint_graph): Use graph_size.
(solve_graph): Don't process constraints that cannot change the
solution, don't try to propagate an empty solution to our
successors.
(process_constraint): Set directly_dereferenced.
(could_have_pointers): New function.
(get_constraint_for_component_ref): Don't process STRING_CST.
(nonlocal_lookup): New function.
(nonlocal_insert): Ditto.
(create_nonlocal_var): Ditto.
(get_nonlocal_id_for_type): Ditto.
(get_constraint_for): Allow results vector to be empty in the case
of string constants.
Handle results of calls properly.
(update_alias_info): Update alias info stats on number and type of
calls.
(find_func_aliases): Use could_have_pointers.
(make_constraint_from_escaped): Renamed from
make_constraint_to_anything, and changed to make constraints from
escape variable.
(make_constraint_to_escaped): New function.
(find_global_initializers): Ditto.
(create_variable_info_for): Make constraint from escaped to any
global variable, and from any global variable to the set of
escaped vars.
(intra_create_variable_infos): Deal with escaped instead of
pointing to anything.
(set_uids_in_ptset): Do type pruning on directly dereferenced
variables.
(find_what_p_points_to): Adjust call to set_uids_with_ptset.
(init_base_vars): Fix comment, and initialize escaped_vars.
(need_to_solve): Removed.
(find_escape_constraints): New function.
(expand_nonlocal_solutions): Ditto.
(compute_points_to_sets): Call find_escape_constraints and
expand_nonlocal_solutions.
(delete_points_to_sets): Don't fall off the end of the graph.
(init_alias_heapvars): Initialize nonlocal_for_type and
nonlocal_all.
(delete_alias_heapvars): Free nonlocal_for_type and null out
nonlocal_all.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117891 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr28778.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr29156.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pta-fp.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-structalias.c
gcc/tree-ssa-structalias.h
gcc/tree.h