aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-10-26 10:47:09 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-10-26 10:47:09 +0000
commit930e85a354290c8c9f5ed5166aa53de4e3f005ef (patch)
tree2b54d3fbf81623759c5cd2fd497d3bfb86d6ea32 /gcc
parent306fa91bda69b9ebb411876fa7ac54532c63e3f7 (diff)
downloadgcc-930e85a354290c8c9f5ed5166aa53de4e3f005ef.zip
gcc-930e85a354290c8c9f5ed5166aa53de4e3f005ef.tar.gz
gcc-930e85a354290c8c9f5ed5166aa53de4e3f005ef.tar.bz2
Add make_restrict_var_constraints
2015-10-26 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (make_restrict_var_constraints): New function, factored out of ... (intra_create_variable_infos): ... here. From-SVN: r229324
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-structalias.c24
2 files changed, 22 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e4a8b88..8084f4b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2015-10-26 Tom de Vries <tom@codesourcery.com>
+ * tree-ssa-structalias.c (make_restrict_var_constraints): New function,
+ factored out of ...
+ (intra_create_variable_infos): ... here.
+
+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.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 1e1ae95..63a3d02 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5844,6 +5844,21 @@ debug_solution_for_var (unsigned int var)
dump_solution_for_var (stderr, var);
}
+/* Register the constraints for restrict var VI. */
+
+static void
+make_restrict_var_constraints (varinfo_t vi)
+{
+ for (; vi; vi = vi_next (vi))
+ if (vi->may_have_pointers)
+ {
+ if (vi->only_restrict_pointers)
+ make_constraint_from_global_restrict (vi, "GLOBAL_RESTRICT");
+ else
+ make_copy_constraint (vi, nonlocal_id);
+ }
+}
+
/* Create varinfo structures for all of the variables in the
function for intraprocedural mode. */
@@ -5882,14 +5897,7 @@ intra_create_variable_infos (struct function *fn)
vi->is_restrict_var = 1;
insert_vi_for_tree (heapvar, vi);
make_constraint_from (p, vi->id);
- for (; vi; vi = vi_next (vi))
- if (vi->may_have_pointers)
- {
- if (vi->only_restrict_pointers)
- make_constraint_from_global_restrict (vi, "GLOBAL_RESTRICT");
- else
- make_copy_constraint (vi, nonlocal_id);
- }
+ make_restrict_var_constraints (vi);
continue;
}