aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 84edf00..95ca882 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3475,6 +3475,7 @@ handle_lhs_call (tree lhs, int flags, VEC(ce_s, heap) *rhsc)
vi = make_constraint_from_heapvar (get_vi_for_tree (lhs), "HEAP");
/* We delay marking allocated storage global until we know if
it escapes. */
+ DECL_EXTERNAL (vi->decl) = 0;
vi->is_global_var = 0;
}
else if (VEC_length (ce_s, rhsc) > 0)
@@ -4785,8 +4786,10 @@ find_what_var_points_to (varinfo_t vi, struct pt_solution *pt)
else if (vi->is_heap_var)
/* We represent heapvars in the points-to set properly. */
;
+ else if (vi->id == readonly_id)
+ /* Nobody cares. */
+ ;
else if (vi->id == anything_id
- || vi->id == readonly_id
|| vi->id == integer_id)
pt->anything = 1;
}
@@ -5460,9 +5463,10 @@ compute_points_to_sets (void)
/* Mark escaped HEAP variables as global. */
for (i = 0; VEC_iterate (varinfo_t, varmap, i, vi); ++i)
if (vi->is_heap_var
+ && !vi->is_restrict_var
&& !vi->is_global_var)
- vi->is_global_var = pt_solution_includes (&cfun->gimple_df->escaped,
- vi->decl);
+ DECL_EXTERNAL (vi->decl) = vi->is_global_var
+ = pt_solution_includes (&cfun->gimple_df->escaped, vi->decl);
/* Compute the points-to sets for pointer SSA_NAMEs. */
for (i = 0; i < num_ssa_names; ++i)