aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-09-14 12:22:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-09-14 12:22:27 +0000
commitedb32daf78f96b05c4299fa9761c892a48a718dd (patch)
tree3f4bf74f7c4398502fbe199fba391b9d37626158 /gcc/passes.c
parent645708abf6998d0c31048464c02534d090bc4262 (diff)
downloadgcc-edb32daf78f96b05c4299fa9761c892a48a718dd.zip
gcc-edb32daf78f96b05c4299fa9761c892a48a718dd.tar.gz
gcc-edb32daf78f96b05c4299fa9761c892a48a718dd.tar.bz2
re PR tree-optimization/54565 (pass_update_address_taken before forwprop1 for vectors)
2012-09-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/54565 * passes.c (init_optimization_passes): Adjust comments. (execute_function_todo): Do not execute execute_update_addresses_taken before processing TODO_rebuild_alias. * tree-ssa-ccp.c (do_ssa_ccp): Schedule TODO_update_address_taken. * gcc.dg/tree-ssa/ssa-ccp-17.c: Adjust. * gcc.dg/tree-ssa/forwprop-6.c: Likewise. Remove XFAIL. From-SVN: r191295
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index e6a4f93..a47068d 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1297,11 +1297,11 @@ init_optimization_passes (void)
NEXT_PASS (pass_remove_cgraph_callee_edges);
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
NEXT_PASS (pass_forwprop);
/* pass_build_ealias is a dummy pass that ensures that we
- execute TODO_rebuild_alias at this point. Re-building
- alias information also rewrites no longer addressed
- locals into SSA form if possible. */
+ execute TODO_rebuild_alias at this point. */
NEXT_PASS (pass_build_ealias);
NEXT_PASS (pass_sra_early);
NEXT_PASS (pass_fre);
@@ -1371,11 +1371,11 @@ init_optimization_passes (void)
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_complete_unrolli);
NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
NEXT_PASS (pass_forwprop);
/* pass_build_alias is a dummy pass that ensures that we
- execute TODO_rebuild_alias at this point. Re-building
- alias information also rewrites no longer addressed
- locals into SSA form if possible. */
+ execute TODO_rebuild_alias at this point. */
NEXT_PASS (pass_build_alias);
NEXT_PASS (pass_return_slot);
NEXT_PASS (pass_phiprop);
@@ -1414,6 +1414,8 @@ init_optimization_passes (void)
NEXT_PASS (pass_object_sizes);
NEXT_PASS (pass_strlen);
NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_cse_sincos);
NEXT_PASS (pass_optimize_bswap);
@@ -1773,13 +1775,10 @@ execute_function_todo (void *data)
cfun->last_verified &= ~TODO_verify_ssa;
}
- if (flags & TODO_rebuild_alias)
- {
- execute_update_addresses_taken ();
- if (flag_tree_pta)
- compute_may_aliases ();
- }
- else if (optimize && (flags & TODO_update_address_taken))
+ if (flag_tree_pta && (flags & TODO_rebuild_alias))
+ compute_may_aliases ();
+
+ if (optimize && (flags & TODO_update_address_taken))
execute_update_addresses_taken ();
if (flags & TODO_remove_unused_locals)