+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
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. */
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;
}