summaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 20:52:47 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 20:52:47 +0000
commitb1b7c0c4f7f54c51f0475ad23b170495083d6fd4 (patch)
tree162c2336093852966cecdacd8587d21a4e4868f9 /gcc/passes.c
parentfc7fd1438e8e45f79d0af78616c50ed2a49ef8a3 (diff)
downloadgcc-b1b7c0c4f7f54c51f0475ad23b170495083d6fd4.tar.gz
2007-08-14 Daniel Berlin <dberlin@dberlin.org>
* tree-pass.h (PROP_pta): Removed. (TODO_rebuild_alias): New. (pass_may_alias): Removed. * tree-ssa-ccp.c (execute_fold_all_builtins): Only rebuild aliasing if we changed something. * tree-ssa-alias.c (compute_may_aliases): Make non-static. Update SSA internally. (pass_may_alias): Removed. (create_structure_vars): Return TODO_rebuild_alias. * tree-ssa-pre.c (do_pre): Return TODO_rebuild_alias. * tree-sra.c (tree_sra): Only rebuild aliasing if something changed. (tree_sra_early): We never affect aliasing right now. * tree-flow.h (compute_may_aliases): New prototype. * passes.c: Remove pass_may_alias from the passes. (execute_function_todo): Support TODO_rebuild_alias. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 2d26a9031c9..1ec6b0a2c0d 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -551,7 +551,6 @@ init_optimization_passes (void)
{
struct tree_opt_pass **p = &pass_all_optimizations.sub;
NEXT_PASS (pass_create_structure_vars);
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_return_slot);
NEXT_PASS (pass_rename_ssa_copies);
@@ -566,26 +565,19 @@ init_optimization_passes (void)
NEXT_PASS (pass_vrp);
NEXT_PASS (pass_dce);
NEXT_PASS (pass_dominator);
-
/* The only const/copy propagation opportunities left after
DOM should be due to degenerate PHI nodes. So rather than
run the full propagators, run a specialized pass which
only examines PHIs to discover const/copy propagation
opportunities. */
NEXT_PASS (pass_phi_only_cprop);
-
NEXT_PASS (pass_tree_ifcombine);
NEXT_PASS (pass_phiopt);
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_tail_recursion);
NEXT_PASS (pass_ch);
NEXT_PASS (pass_stdarg);
NEXT_PASS (pass_lower_complex);
NEXT_PASS (pass_sra);
- /* FIXME: SRA may generate arbitrary gimple code, exposing new
- aliased and call-clobbered variables. As mentioned below,
- pass_may_alias should be a TODO item. */
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_dominator);
@@ -599,7 +591,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_reassoc);
NEXT_PASS (pass_dce);
NEXT_PASS (pass_dse);
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_forwprop);
NEXT_PASS (pass_phiopt);
NEXT_PASS (pass_object_sizes);
@@ -607,13 +598,8 @@ init_optimization_passes (void)
NEXT_PASS (pass_store_copy_prop);
NEXT_PASS (pass_fold_builtins);
NEXT_PASS (pass_cse_sincos);
- /* FIXME: May alias should a TODO but for 4.0.0,
- we add may_alias right after fold builtins
- which can create arbitrary GIMPLE. */
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_split_crit_edges);
NEXT_PASS (pass_pre);
- NEXT_PASS (pass_may_alias);
NEXT_PASS (pass_sink_code);
NEXT_PASS (pass_tree_loop);
{
@@ -637,9 +623,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_lower_vector_ssa);
NEXT_PASS (pass_dce_loop);
}
- /* NEXT_PASS (pass_may_alias) cannot be done again because the
- vectorizer creates alias relations that are not supported by
- pass_may_alias. */
NEXT_PASS (pass_complete_unroll);
NEXT_PASS (pass_loop_prefetch);
NEXT_PASS (pass_iv_optimize);
@@ -650,7 +633,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_reassoc);
NEXT_PASS (pass_vrp);
NEXT_PASS (pass_dominator);
-
+
/* The only const/copy propagation opportunities left after
DOM should be due to degenerate PHI nodes. So rather than
run the full propagators, run a specialized pass which
@@ -912,7 +895,13 @@ execute_function_todo (void *data)
update_ssa (update_flags);
cfun->last_verified &= ~TODO_verify_ssa;
}
-
+
+ if (flags & TODO_rebuild_alias)
+ {
+ compute_may_aliases ();
+ cfun->curr_properties |= PROP_alias;
+ }
+
if (flags & TODO_remove_unused_locals)
remove_unused_locals ();