aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-pretty-print.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-05-12 13:05:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-05-12 13:05:13 +0000
commit763baff6f54ec6070e0ec6497363f5116ab4c874 (patch)
tree84e63fa7e081279f7a68aca414b7f88e4487c667 /gcc/gimple-pretty-print.c
parentcf48d8c4dc0556d165cd369eb5fa4d77fe823e59 (diff)
downloadgcc-763baff6f54ec6070e0ec6497363f5116ab4c874.zip
gcc-763baff6f54ec6070e0ec6497363f5116ab4c874.tar.gz
gcc-763baff6f54ec6070e0ec6497363f5116ab4c874.tar.bz2
re PR middle-end/71062 (r235622 and restrict pointers)
2016-05-12 Richard Biener <rguenther@suse.de> PR tree-optimization/71062 * tree-ssa-alias.h (struct pt_solution): Add vars_contains_restrict field. * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_restrict if the var is a restrict tag. * tree-ssa-alias.c (ptrs_compare_unequal): If vars_contains_restrict do not disambiguate pointers against it. (dump_points_to_solution): Re-structure and adjust for new vars_contains_restrict flag. * gimple-pretty-print.c (pp_points_to_solution): Likewise. * gcc.dg/torture/pr71062.c: New testcase. From-SVN: r236174
Diffstat (limited to 'gcc/gimple-pretty-print.c')
-rw-r--r--gcc/gimple-pretty-print.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index e27214f..4b0dc7c 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -632,17 +632,37 @@ pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
}
pp_right_brace (buffer);
if (pt->vars_contains_nonlocal
- && pt->vars_contains_escaped_heap)
- pp_string (buffer, " (nonlocal, escaped heap)");
- else if (pt->vars_contains_nonlocal
- && pt->vars_contains_escaped)
- pp_string (buffer, " (nonlocal, escaped)");
- else if (pt->vars_contains_nonlocal)
- pp_string (buffer, " (nonlocal)");
- else if (pt->vars_contains_escaped_heap)
- pp_string (buffer, " (escaped heap)");
- else if (pt->vars_contains_escaped)
- pp_string (buffer, " (escaped)");
+ || pt->vars_contains_escaped
+ || pt->vars_contains_escaped_heap
+ || pt->vars_contains_restrict)
+ {
+ const char *comma = "";
+ pp_string (buffer, " (");
+ if (pt->vars_contains_nonlocal)
+ {
+ pp_string (buffer, "nonlocal");
+ comma = ", ";
+ }
+ if (pt->vars_contains_escaped)
+ {
+ pp_string (buffer, comma);
+ pp_string (buffer, "escaped");
+ comma = ", ";
+ }
+ if (pt->vars_contains_escaped_heap)
+ {
+ pp_string (buffer, comma);
+ pp_string (buffer, "escaped heap");
+ comma = ", ";
+ }
+ if (pt->vars_contains_restrict)
+ {
+ pp_string (buffer, comma);
+ pp_string (buffer, "restrict");
+ }
+ pp_string (buffer, ")");
+ }
+
}
}