On 27/10/15 08:25, Tom de Vries wrote:
@@ -5968,7 +5990,16 @@ intra_create_variable_infos (struct function *fn)
for (; p; p = vi_next (p))
{
if (p->only_restrict_pointers)
- make_constraint_from_global_restrict (p, "PARM_RESTRICT");
+ {
+ varinfo_t vi = lookup_restrict_pointed_var (p);
+ if (vi != NULL)
+ {
+ make_constraint_from (p, vi->id);
+ make_restrict_var_constraints (vi);
+ }
+ else
+ make_constraint_from_global_restrict (p, "PARM_RESTRICT");
+ }
else if (p->may_have_pointers)
make_constraint_from (p, nonlocal_id);
}
-- 1.9.1
Thinking it over a bit more, I realized the constraint handling started
to be messy. I've reworked the patch series to simplify that first.
1 Simplify constraint handling
2 Rename make_restrict_var_constraints to make_param_constraints
3 Add recursion to make_param_constraints
4 Add handle_param parameter to create_variable_info_for_1
5 Handle recursive restrict pointer in create_variable_info_for_1
6 Handle restrict struct fields recursively
Currently doing bootstrap and regtest on x86_64.
I'll repost the patch series in reply to this message.
Thanks,
- Tom