From 735b8f9fc4b14384b246b39dfccbf529402b7791 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Mon, 17 Oct 2016 23:35:48 +0000 Subject: 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 * 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 * gcc.dg/torture/pr39074-2.c: Adjust testcase. * gcc.dg/torture/pr39074.c: Likewise. From-SVN: r241287 --- gcc/tree-ssanames.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree-ssanames.h') diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h index 4496e1d..d39cc9d 100644 --- a/gcc/tree-ssanames.h +++ b/gcc/tree-ssanames.h @@ -88,6 +88,8 @@ extern void set_ptr_info_alignment (struct ptr_info_def *, unsigned int, extern void adjust_ptr_info_misalignment (struct ptr_info_def *, unsigned int); extern struct ptr_info_def *get_ptr_info (tree); +extern void set_ptr_nonnull (tree); +extern bool get_ptr_nonnull (const_tree); extern tree copy_ssa_name_fn (struct function *, tree, gimple *); extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *); -- cgit v1.1