OSDN Git Service

2009-06-29 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jun 2009 12:23:21 +0000 (12:23 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jun 2009 12:23:21 +0000 (12:23 +0000)
commit1c1f1bc0ab7e9b35d4dd92a983a0c72ba215cb2d
tree9628cef93c202d8f6bd22c558673343fbd31f01a
parent8115f0afdaff380da01d555b0584cd0fceb789b8
2009-06-29  Richard Guenther  <rguenther@suse.de>

PR middle-end/14187
* tree-ssa-alias.h (struct pt_solution): Add vars_contains_restrict
flag.
(pt_solutions_same_restrict_base): Declare.
* tree-ssa-structalias.c (struct variable_info): Add is_restrict_var
flag.
(new_var_info): Initialize is_global_var properly for SSA_NAMEs.
(make_constraint_from, make_copy_constraint): Move earlier.
(make_constraint_from_heapvar): New function.
(make_constraint_from_restrict): Likewise.
(handle_lhs_call): Use it.
(find_func_aliases): Use it to track conversions to restrict
qualified pointers.
(struct fieldoff): Add only_restrict_pointers flag.
(push_fields_onto_fieldstack): Initialize it.
(create_variable_info_for): Track global restrict qualified pointers.
(intra_create_variable_infos): Use make_constraint_from_heapvar.
Track restrict qualified pointer arguments.
(set_uids_in_ptset): Use varinfo is_global_var flag.
(find_what_var_points_to): Set the vars_contains_restrict flag.
Always create the points-to solution for sets including restrict tags.
(pt_solutions_same_restrict_base): New function.
* tree-ssa-alias.c (ptr_derefs_may_alias_p): For two restrict
qualified pointers use pt_solutions_same_restrict_base as
additional source for disambiguation.

* gcc.dg/tree-ssa/restrict-1.c: New testcase.
* gcc.dg/tree-ssa/restrict-2.c: Likewise.
* gcc.dg/tree-ssa/restrict-3.c: Likewise.
* gcc.c-torture/execute/20090623-1.c: Likewise.
* gcc.dg/tree-ssa/ldist-13.c: Likewise.
* gcc.dg/tree-ssa/ldist-14.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149048 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20090623-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ldist-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ldist-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/restrict-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/restrict-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c [new file with mode: 0644]
gcc/tree-ssa-alias.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-structalias.c