From 11948f6bac2949e7f8158c335e37bb30340d7f86 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 21 Nov 2007 10:16:21 +0000 Subject: [PATCH] re PR tree-optimization/34148 (Too many VOPs, too deep tree-ssa-sccvn.c recursion) 2007-11-21 Richard Guenther PR tree-optimization/34148 * tree-ssa-structalias.c (create_variable_info_for): Do not use field-sensitive PTA for single-element structures. * tree-ssa-alias.c (create_overlap_variables_for): Do not create SFTs for single-element structures. From-SVN: r130329 --- gcc/ChangeLog | 8 ++++++++ gcc/tree-ssa-alias.c | 2 +- gcc/tree-ssa-structalias.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac26d4075f7..fa8060355d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-11-21 Richard Guenther + + PR tree-optimization/34148 + * tree-ssa-structalias.c (create_variable_info_for): Do not use + field-sensitive PTA for single-element structures. + * tree-ssa-alias.c (create_overlap_variables_for): Do not create + SFTs for single-element structures. + 2007-11-20 Richard Guenther PR middle-end/34154 diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 7d6c0e1fad1..13ec95b9e9d 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -3837,7 +3837,7 @@ create_overlap_variables_for (tree var) TREE_TYPE (var)); /* Make sure to not create SFTs for structs we won't generate variable infos for. See tree-ssa-structalias.c:create_variable_info_for (). */ - if (VEC_length (fieldoff_s, fieldstack) != 0 + if (VEC_length (fieldoff_s, fieldstack) > 1 && VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE) { subvar_t *subvars; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 5fbcfc5cc55..5e197c47fee 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4441,6 +4441,7 @@ create_variable_info_for (tree decl, const char *name) && !notokay && !vi->is_unknown_size_var && var_can_have_subvars (decl) + && VEC_length (fieldoff_s, fieldstack) > 1 && VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE) { unsigned int newindex = VEC_length (varinfo_t, varmap); -- 2.30.2