aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2007-06-20 18:19:10 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2007-06-20 18:19:10 +0000
commit3d9b47dc431c0e8b967f390f28a68fe371d47eb4 (patch)
tree9e2d4808d596fbdc61945b54d0c37a41b151ec67 /gcc/alias.c
parent034bfe7a9f51a82d1eadeb037791e5f467395eba (diff)
downloadgcc-3d9b47dc431c0e8b967f390f28a68fe371d47eb4.zip
gcc-3d9b47dc431c0e8b967f390f28a68fe371d47eb4.tar.gz
gcc-3d9b47dc431c0e8b967f390f28a68fe371d47eb4.tar.bz2
re PR tree-optimization/25737 (ACATS c974001 c974013 hang with struct aliasing)
PR tree-optimization/25737 * tree.h (struct tree_struct_field_tag): Add new field alias_set. (SFT_NONADDRESSABLE_P, SFT_ALIAS_SET): New macros. * tree-flow.h (struct fieldoff): Add new field alias_set. * tree-ssa-structalias.c (push_fields_onto_fieldstack): Add new argument addressable_type. Set alias_set of fieldoff. * tree-ssa-alias.c (create_sft): Add new argument alias_set. (create_overlap_variables_for): Pass alias_set from fieldoff to create_sft. * alias.c (get_alias_set): Use alias_set from SFT if set. From-SVN: r125890
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index c03ff03..8064b8e 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -586,6 +586,13 @@ get_alias_set (tree t)
return 0;
}
+ /* For non-addressable fields we return the alias set of the
+ outermost object that could have its address taken. If this
+ is an SFT use the precomputed value. */
+ if (TREE_CODE (t) == STRUCT_FIELD_TAG
+ && SFT_NONADDRESSABLE_P (t))
+ return SFT_ALIAS_SET (t);
+
/* Otherwise, pick up the outermost object that we could have a pointer
to, processing conversions as above. */
while (component_uses_parent_alias_set (t))