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.
+
+2012-09-14 Richard Guenther <rguenther@suse.de>
+
* tree-vrp.c (register_new_assert_for): Simplify for backward
walk.
(find_assert_locations_1): Walk the basic-block backwards,
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);
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);
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);
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)
particular situation before doing this transformation we have to
assure that a is killed by a dominating store via type float for
it to be valid. Then we might as well handle the situation by
- value-numbering, removing the load alltogether. */
-/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" { xfail *-*-* } } } */
+ value-numbering, removing the load alltogether.
+ ??? We now do this after CPP re-writes a into SSA form. */
+/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */