diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2006-01-06 15:00:50 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-01-06 07:00:50 -0800 |
commit | 8ae5e6f215545e316f6cb2b84fae7b64cdd44de1 (patch) | |
tree | a2eb7c5a1ac7d7676af864386f00a8b4e000cc8b /gcc/tree-ssa-structalias.c | |
parent | cc4bb878f1aeec920683a8d6ec3774e161f386b7 (diff) | |
download | gcc-8ae5e6f215545e316f6cb2b84fae7b64cdd44de1.zip gcc-8ae5e6f215545e316f6cb2b84fae7b64cdd44de1.tar.gz gcc-8ae5e6f215545e316f6cb2b84fae7b64cdd44de1.tar.bz2 |
re PR tree-optimization/25528 (missed LIM on the tree level (complex types))
2006-01-06 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/25528
* tree-ssa-alias.c (find_used_portions): Handle REALPART_EXPR
and IMAGPART_EXPR.
* tree-flow-inline.h (var_can_have_subvars): Handle complex types
on non gimple variables. Also add checks at the top for decls and
mtags.
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Handle
complex types.
* tree-ssa-operands.c (parse_ssa_operands): Handle REALPART_EXPR
and IMAGPART_EXPR for creating MUST_DEFs.
(get_expr_operands): Handle SSA_NAME, STRUCT_FIELD_TAG, TYPE_MEMORY_TAG,
and NAME_MEMORY_TAG separately from the DECLs.
From-SVN: r109419
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index bae21a0..0e2032c 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3568,6 +3568,24 @@ push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack, { tree field; int count = 0; + + if (TREE_CODE (type) == COMPLEX_TYPE) + { + fieldoff_s *real_part, *img_part; + real_part = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL); + real_part->type = TREE_TYPE (type); + real_part->size = TYPE_SIZE (TREE_TYPE (type)); + real_part->offset = offset; + real_part->decl = NULL_TREE; + + img_part = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL); + img_part->type = TREE_TYPE (type); + img_part->size = TYPE_SIZE (TREE_TYPE (type)); + img_part->offset = offset + TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (type))); + img_part->decl = NULL_TREE; + + return 2; + } for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) if (TREE_CODE (field) == FIELD_DECL) |