aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2006-03-04 00:04:11 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2006-03-04 00:04:11 +0000
commitefdb3de915dd1075975578f61bfe274ad87b5503 (patch)
tree50268fd54b771d1fee4d2d751a5206f5adca7a71 /gcc/tree-sra.c
parent0efaed01c008b4100724d9984e72d82bad1e66f1 (diff)
downloadgcc-efdb3de915dd1075975578f61bfe274ad87b5503.zip
gcc-efdb3de915dd1075975578f61bfe274ad87b5503.tar.gz
gcc-efdb3de915dd1075975578f61bfe274ad87b5503.tar.bz2
tree-sra.c (tree_sra): Return todoflags;
2006-03-03 Daniel Berlin <dberlin@dberlin.org> * tree-sra.c (tree_sra): Return todoflags; (generate_one_element): Set TODO_update_smt_usage if needed. (pass_sra): Remove TODO_update_smt_usage. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Add some parameter. (tree_ssa_forward_propagate_single_use_vars): Return TODO_update_smt_usage if we need to update SMT usage. (pass_forwprop): Remove TODO_update_smt_usage. From-SVN: r111692
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 0b594b9..1faff83 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -75,6 +75,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
*/
+/* The set of todo flags to return from tree_sra. */
+static unsigned int todoflags;
+
/* The set of aggregate variables that are candidates for scalarization. */
static bitmap sra_candidates;
@@ -1432,6 +1435,9 @@ decide_instantiations (void)
bitmap_and_compl_into (needs_copy_in, &done_head);
}
bitmap_clear (&done_head);
+
+ if (!bitmap_empty_p (sra_candidates))
+ todoflags |= TODO_update_smt_usage;
mark_set_for_renaming (sra_candidates);
@@ -1515,6 +1521,7 @@ generate_one_element_ref (struct sra_elt *elt, tree base)
}
case ARRAY_TYPE:
+ todoflags |= TODO_update_smt_usage;
return build4 (ARRAY_REF, elt->type, base, elt->element, NULL, NULL);
case COMPLEX_TYPE:
@@ -2182,6 +2189,7 @@ static unsigned int
tree_sra (void)
{
/* Initialize local variables. */
+ todoflags = 0;
gcc_obstack_init (&sra_obstack);
sra_candidates = BITMAP_ALLOC (NULL);
needs_copy_in = BITMAP_ALLOC (NULL);
@@ -2204,7 +2212,7 @@ tree_sra (void)
BITMAP_FREE (sra_type_decomp_cache);
BITMAP_FREE (sra_type_inst_cache);
obstack_free (&sra_obstack, NULL);
- return 0;
+ return todoflags;
}
static bool
@@ -2226,7 +2234,7 @@ struct tree_opt_pass pass_sra =
0, /* properties_provided */
PROP_smt_usage, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_update_smt_usage | TODO_dump_func /* todo_flags_finish */
+ TODO_dump_func /* todo_flags_finish */
| TODO_update_ssa
| TODO_ggc_collect | TODO_verify_ssa,
0 /* letter */