aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2006-02-20 13:38:01 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2006-02-20 13:38:01 +0000
commita6c550f98551764dab0f1d5492c993fa94426688 (patch)
tree16d20e32d96535b3c2b5c91db8c2382c5b3fb541 /gcc/passes.c
parentcf9d76188a45f75f60b307b8a776279d6ad5e630 (diff)
downloadgcc-a6c550f98551764dab0f1d5492c993fa94426688.zip
gcc-a6c550f98551764dab0f1d5492c993fa94426688.tar.gz
gcc-a6c550f98551764dab0f1d5492c993fa94426688.tar.bz2
tree.h (struct tree_memory_tag): Add is_used_alone member.
2006-02-20 Daniel Berlin <dberlin@dberlin.org> * tree.h (struct tree_memory_tag): Add is_used_alone member. (TMT_USED_ALONE): New macro. * tree-pass.h (PROP_tmt_usage): New property. (TODO_update_tmt_usage): New todo. * tree-ssa-alias.c (updating_used_alone): New variable. (recalculate_used_alone): New function. (compute_may_aliases): Set updating_used_alone, call recalculate_used_alone. * tree-sra.c (pass_sra): Note that this pass destroys PROP_tmt_usage, and add TODO_update_tmt_usage. * tree-ssa-forwprop.c (pass_forwprop): Ditto. * tree-flow.h (updating_used_alone): Prototype. (recalculate_used_alone): Ditto. * passes.c (execute_todo): Add code to set updating_used_alone, and call recalculate. * tree-ssa-operands.c (add_virtual_operand): Only append bare def for clobber if used alone, and add assert to verify used_alone status. From-SVN: r111300
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index e088be1..43efc7f 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -718,8 +718,12 @@ execute_todo (unsigned int flags)
flags &= ~last_verified;
if (!flags)
return;
+
+ /* Always recalculate TMT usage before doing anything else. */
+ if (flags & TODO_update_tmt_usage)
+ recalculate_used_alone ();
- /* Always cleanup the CFG before doing anything else. */
+ /* Always cleanup the CFG before trying to update SSA . */
if (flags & TODO_cleanup_cfg)
{
if (current_loops)
@@ -822,6 +826,9 @@ execute_one_pass (struct tree_opt_pass *pass)
gcc_assert ((curr_properties & pass->properties_required)
== pass->properties_required);
+ if (pass->properties_destroyed & PROP_tmt_usage)
+ updating_used_alone = true;
+
/* If a dump file name is present, open it if enabled. */
if (pass->static_pass_number != -1)
{
@@ -888,6 +895,9 @@ execute_one_pass (struct tree_opt_pass *pass)
dump_file = NULL;
}
+ if (pass->properties_destroyed & PROP_tmt_usage)
+ updating_used_alone = false;
+
return true;
}