aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-08-29 11:47:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-08-29 11:47:01 +0000
commit13c6bff447cc89b20e6e139b96dfd866fede5644 (patch)
tree7cc708e9b0ec5ee73df0c88b03384f4147930e04 /gcc/tree-ssa-structalias.c
parentdce2b2f6cb34a4f53ff5bedac672b3a113552b54 (diff)
downloadgcc-13c6bff447cc89b20e6e139b96dfd866fede5644.zip
gcc-13c6bff447cc89b20e6e139b96dfd866fede5644.tar.gz
gcc-13c6bff447cc89b20e6e139b96dfd866fede5644.tar.bz2
tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state.
2008-08-29 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state. For NO_ALIAS_ANYTHING variables add a self-constraint, not one from ESCAPED. * gfortran.fortran-torture/compile/20080806-1.f90: New testcase. From-SVN: r139765
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index db0912a..6db8298 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4354,7 +4354,11 @@ create_variable_info_for (tree decl, const char *name)
if (TREE_CODE (decl) == FUNCTION_DECL && in_ipa_mode)
return create_function_info_for (decl, name);
- if (var_can_have_subvars (decl) && use_field_sensitive)
+ if (var_can_have_subvars (decl) && use_field_sensitive
+ && (!var_ann (decl)
+ || var_ann (decl)->noalias_state == 0)
+ && (!var_ann (decl)
+ || !var_ann (decl)->is_heapvar))
push_fields_onto_fieldstack (decl_type, &fieldstack, 0);
/* If the variable doesn't have subvars, we may end up needing to
@@ -4380,7 +4384,13 @@ create_variable_info_for (tree decl, const char *name)
VEC_safe_push (varinfo_t, heap, varmap, vi);
if (is_global && (!flag_whole_program || !in_ipa_mode)
&& could_have_pointers (decl))
- make_constraint_from (vi, escaped_id);
+ {
+ if (var_ann (decl)
+ && var_ann (decl)->noalias_state == NO_ALIAS_ANYTHING)
+ make_constraint_from (vi, vi->id);
+ else
+ make_constraint_from (vi, escaped_id);
+ }
stats.total_vars++;
if (use_field_sensitive