aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-01-06 15:00:50 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-01-06 07:00:50 -0800
commit8ae5e6f215545e316f6cb2b84fae7b64cdd44de1 (patch)
treea2eb7c5a1ac7d7676af864386f00a8b4e000cc8b /gcc/tree-flow-inline.h
parentcc4bb878f1aeec920683a8d6ec3774e161f386b7 (diff)
downloadgcc-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-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 94e1972..3f8e89d 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -1490,13 +1490,28 @@ get_subvar_at (tree var, unsigned HOST_WIDE_INT offset)
/* Return true if V is a tree that we can have subvars for.
Normally, this is any aggregate type, however, due to implementation
- limitations ATM, we exclude array types as well. */
+ limitations ATM, we exclude array types as well. Also complex
+ types which are not gimple registers can have subvars. */
static inline bool
var_can_have_subvars (tree v)
{
- return (AGGREGATE_TYPE_P (TREE_TYPE (v)) &&
- TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE);
+ /* Non decls or memory tags can never have subvars. */
+ if (!DECL_P (v) || MTAG_P (v))
+ return false;
+
+ /* Aggregates besides arrays can have subvars. */
+ if (AGGREGATE_TYPE_P (TREE_TYPE (v))
+ && TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE)
+ return true;
+
+ /* Complex types variables which are not also a gimple register can
+ have subvars. */
+ if (TREE_CODE (TREE_TYPE (v)) == COMPLEX_TYPE
+ && !DECL_COMPLEX_GIMPLE_REG_P (v))
+ return true;
+
+ return false;
}