diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-10-26 10:47:00 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-10-26 10:47:00 +0000 |
commit | 306fa91bda69b9ebb411876fa7ac54532c63e3f7 (patch) | |
tree | c8b6cc06aaf223bf79c5c11749abd6d800482528 | |
parent | e541e62f3b49076aa72fcfa5e7f01f3b97e91fda (diff) | |
download | gcc-306fa91bda69b9ebb411876fa7ac54532c63e3f7.zip gcc-306fa91bda69b9ebb411876fa7ac54532c63e3f7.tar.gz gcc-306fa91bda69b9ebb411876fa7ac54532c63e3f7.tar.bz2 |
Add vars in intra_create_variables_info
2015-10-26 Tom de Vries <tom@codesourcery.com>
* tree-ssa-structalias.c (intra_create_variable_infos): Add
restrict_pointer_p and recursive_restrict_p variables.
From-SVN: r229323
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b9ddd7..e4a8b88 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2015-10-26 Tom de Vries <tom@codesourcery.com> + * tree-ssa-structalias.c (intra_create_variable_infos): Add + restrict_pointer_p and recursive_restrict_p variables. + +2015-10-26 Tom de Vries <tom@codesourcery.com> + * tree-ssa-structalias.c (intra_create_variable_infos): Inline get_vi_for_tree call. diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index c5a7e2a..1e1ae95 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5857,6 +5857,11 @@ intra_create_variable_infos (struct function *fn) passed-by-reference argument. */ for (t = DECL_ARGUMENTS (fn->decl); t; t = DECL_CHAIN (t)) { + bool restrict_pointer_p = (POINTER_TYPE_P (TREE_TYPE (t)) + && TYPE_RESTRICT (TREE_TYPE (t))); + bool recursive_restrict_p + = (restrict_pointer_p + && !type_contains_placeholder_p (TREE_TYPE (TREE_TYPE (t)))); varinfo_t p = lookup_vi_for_tree (t); if (p == NULL) { @@ -5868,9 +5873,7 @@ intra_create_variable_infos (struct function *fn) the pointed-to object. Note that this ends up handling out-of-bound references conservatively by aggregating them in the first/last subfield of the object. */ - if (POINTER_TYPE_P (TREE_TYPE (t)) - && TYPE_RESTRICT (TREE_TYPE (t)) - && !type_contains_placeholder_p (TREE_TYPE (TREE_TYPE (t)))) + if (recursive_restrict_p) { varinfo_t vi; tree heapvar = build_fake_var_decl (TREE_TYPE (TREE_TYPE (t))); @@ -5890,8 +5893,7 @@ intra_create_variable_infos (struct function *fn) continue; } - if (POINTER_TYPE_P (TREE_TYPE (t)) - && TYPE_RESTRICT (TREE_TYPE (t))) + if (restrict_pointer_p) make_constraint_from_global_restrict (p, "PARM_RESTRICT"); else { |