Commit 58b2d87e by Tom de Vries Committed by Tom de Vries

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.

From-SVN: r229684
parent b9ae5084
2015-11-03 Tom de Vries <tom@codesourcery.com> 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 * tree-ssa-structalias.c (make_restrict_var_constraints): Replace
make_copy_constraint call with make_constraint_from call. make_copy_constraint call with make_constraint_from call.
...@@ -5879,19 +5879,22 @@ debug_solution_for_var (unsigned int var) ...@@ -5879,19 +5879,22 @@ debug_solution_for_var (unsigned int var)
dump_solution_for_var (stderr, 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 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)) for (; vi; vi = vi_next (vi))
if (vi->may_have_pointers) {
{ if (vi->only_restrict_pointers)
if (vi->only_restrict_pointers) make_constraint_from_global_restrict (vi, restrict_name, true);
make_constraint_from_global_restrict (vi, "GLOBAL_RESTRICT", true); else if (vi->may_have_pointers)
else make_constraint_from (vi, nonlocal_id);
make_constraint_from (vi, nonlocal_id);
} if (vi->is_full_var)
break;
}
} }
/* Create varinfo structures for all of the variables in the /* Create varinfo structures for all of the variables in the
...@@ -5928,19 +5931,11 @@ intra_create_variable_infos (struct function *fn) ...@@ -5928,19 +5931,11 @@ intra_create_variable_infos (struct function *fn)
vi->is_restrict_var = 1; vi->is_restrict_var = 1;
insert_vi_for_tree (heapvar, vi); insert_vi_for_tree (heapvar, vi);
make_constraint_from (p, vi->id); make_constraint_from (p, vi->id);
make_restrict_var_constraints (vi); make_param_constraints (vi, "GLOBAL_RESTRICT");
continue; continue;
} }
for (; p; p = vi_next (p)) make_param_constraints (p, "PARM_RESTRICT");
{
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;
}
} }
/* Add a constraint for a result decl that is passed by reference. */ /* Add a constraint for a result decl that is passed by reference. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment