diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-10-27 07:09:58 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-10-27 07:09:58 +0000 |
commit | 5acdb61b69011e9d0f6b507fc37160b85ba04c51 (patch) | |
tree | d15fd352d80001e238e44f52ca3043d1161235c3 /gcc | |
parent | 5b92e1895eea1ea9a7eb69553af8d173bd62e134 (diff) | |
download | gcc-5acdb61b69011e9d0f6b507fc37160b85ba04c51.zip gcc-5acdb61b69011e9d0f6b507fc37160b85ba04c51.tar.gz gcc-5acdb61b69011e9d0f6b507fc37160b85ba04c51.tar.bz2 |
Add var in push_fields_onto_fieldstack
2015-10-27 Tom de Vries <tom@codesourcery.com>
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Add and use var
field_type.
From-SVN: r229403
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a2e2ad..bad27b5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-27 Tom de Vries <tom@codesourcery.com> + + * tree-ssa-structalias.c (push_fields_onto_fieldstack): Add and use var + field_type. + 2015-10-27 Bin Cheng <bin.cheng@arm.com> * loop-invariant.c (struct def): New field can_prop_to_addr_uses. diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 63a3d02..5e070bc 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5313,13 +5313,14 @@ push_fields_onto_fieldstack (tree type, vec<fieldoff_s> *fieldstack, { bool push = false; HOST_WIDE_INT foff = bitpos_of_field (field); + tree field_type = TREE_TYPE (field); if (!var_can_have_subvars (field) - || TREE_CODE (TREE_TYPE (field)) == QUAL_UNION_TYPE - || TREE_CODE (TREE_TYPE (field)) == UNION_TYPE) + || TREE_CODE (field_type) == QUAL_UNION_TYPE + || TREE_CODE (field_type) == UNION_TYPE) push = true; else if (!push_fields_onto_fieldstack - (TREE_TYPE (field), fieldstack, offset + foff) + (field_type, fieldstack, offset + foff) && (DECL_SIZE (field) && !integer_zerop (DECL_SIZE (field)))) /* Empty structures may have actual size, like in C++. So @@ -5372,8 +5373,8 @@ push_fields_onto_fieldstack (tree type, vec<fieldoff_s> *fieldstack, e.may_have_pointers = true; e.only_restrict_pointers = (!has_unknown_size - && POINTER_TYPE_P (TREE_TYPE (field)) - && TYPE_RESTRICT (TREE_TYPE (field))); + && POINTER_TYPE_P (field_type) + && TYPE_RESTRICT (field_type)); fieldstack->safe_push (e); } } |