Set nonnull attribute to ptr_info_def based on VRP
authorKugan Vivekanandarajah <kuganv@linaro.org>
Mon, 17 Oct 2016 23:35:48 +0000 (23:35 +0000)
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>
Mon, 17 Oct 2016 23:35:48 +0000 (23:35 +0000)
commit735b8f9fc4b14384b246b39dfccbf529402b7791
tree79b96808abe9a9f3a2571e69510e046068caad46
parent86f980870a28bc9022cc57362b5031ede43ecff9
Set nonnull attribute to ptr_info_def based on VRP

Set nonnull attribute to ptr_info_def based on VRP
gcc/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* tree-ssa-alias.h (pt_solution_singleton_or_null_p): Renamed from
pt_solution_singleton_p.
* tree-ssa-ccp.c (fold_builtin_alloca_with_align): Use renamed
pt_solution_singleton_or_null_p from pt_solution_singleton_p.
* tree-ssa-structalias.c (find_what_p_points_to): Preserve
pointer nonnull computed by VRP.
Also Conservatively set pt.null to 1.
(pt_solution_reset): Conservatively set pt.null to 1.
(pt_solution_singleton_or_null_p): Renamed from
pt_solution_singleton_p.
* tree-ssanames.h (set_ptr_nonnull): Declare.
(get_ptr_nonnull): Likewise.
* tree-ssanames.c (set_ptr_nonnull): New.
(get_ptr_nonnull): Likewise.
* tree-vrp.c (vrp_finalize): Set ptr that are nonnull.
(evrp_dom_walker::before_dom_children): Likewise.

gcc/testsuite/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/torture/pr39074-2.c: Adjust testcase.
* gcc.dg/torture/pr39074.c: Likewise.

From-SVN: r241287
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr39074-2.c
gcc/testsuite/gcc.dg/torture/pr39074.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-ccp.c
gcc/tree-ssa-structalias.c
gcc/tree-ssanames.c
gcc/tree-ssanames.h
gcc/tree-vrp.c