Commit 930e85a3 by Tom de Vries Committed by Tom de Vries

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
parent 306fa91b
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.
......@@ -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;
}
......
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