aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-11-02 23:23:28 +0000
committerTom de Vries <tom@codesourcery.com>2015-11-02 23:23:28 +0000
commit914d52fa411bf4e40f56e2740ee2be4075d239b5 (patch)
treed72e8d913a1350ee8951c1892c09f2c79b5dab5f
parent4eba3da6d069176f5b0940839d025e6b8029a7c4 (diff)
Rename make_restrict_var_constraints to make_param_constraints
2015-11-03 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (make_restrict_var_constraints): Rename to ... (make_param_constraints): ... this. Add and handle restrict_name parameter. Handle is_full_var case. (intra_create_variable_infos): Use make_param_constraints. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@229684 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-ssa-structalias.c33
2 files changed, 21 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5e4a2268abf..3613a68543e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2015-11-03 Tom de Vries <tom@codesourcery.com>
+ * tree-ssa-structalias.c (make_restrict_var_constraints): Rename to ...
+ (make_param_constraints): ... this. Add and handle restrict_name
+ parameter. Handle is_full_var case.
+ (intra_create_variable_infos): Use make_param_constraints.
+
+2015-11-03 Tom de Vries <tom@codesourcery.com>
+
* tree-ssa-structalias.c (make_restrict_var_constraints): Replace
make_copy_constraint call with make_constraint_from call.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 773731d0feb..ded5a1e2ac7 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5879,19 +5879,22 @@ debug_solution_for_var (unsigned int var)
dump_solution_for_var (stderr, var);
}
-/* Register the constraints for restrict var VI. */
+/* Register the constraints for function parameter related VI. Use RESTRICT_NAME
+ as the base name of created restrict vars. */
static void
-make_restrict_var_constraints (varinfo_t vi)
+make_param_constraints (varinfo_t vi, const char *restrict_name)
{
for (; vi; vi = vi_next (vi))
- if (vi->may_have_pointers)
- {
- if (vi->only_restrict_pointers)
- make_constraint_from_global_restrict (vi, "GLOBAL_RESTRICT", true);
- else
- make_constraint_from (vi, nonlocal_id);
- }
+ {
+ if (vi->only_restrict_pointers)
+ make_constraint_from_global_restrict (vi, restrict_name, true);
+ else if (vi->may_have_pointers)
+ make_constraint_from (vi, nonlocal_id);
+
+ if (vi->is_full_var)
+ break;
+ }
}
/* Create varinfo structures for all of the variables in the
@@ -5928,19 +5931,11 @@ intra_create_variable_infos (struct function *fn)
vi->is_restrict_var = 1;
insert_vi_for_tree (heapvar, vi);
make_constraint_from (p, vi->id);
- make_restrict_var_constraints (vi);
+ make_param_constraints (vi, "GLOBAL_RESTRICT");
continue;
}
- for (; p; p = vi_next (p))
- {
- if (p->only_restrict_pointers)
- make_constraint_from_global_restrict (p, "PARM_RESTRICT", true);
- else if (p->may_have_pointers)
- make_constraint_from (p, nonlocal_id);
- if (p->is_full_var)
- break;
- }
+ make_param_constraints (p, "PARM_RESTRICT");
}
/* Add a constraint for a result decl that is passed by reference. */