Commit edb32daf by Richard Guenther Committed by Richard Biener

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
parent 645708ab
2012-09-14 Richard Guenther <rguenther@suse.de> 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 * tree-vrp.c (register_new_assert_for): Simplify for backward
walk. walk.
(find_assert_locations_1): Walk the basic-block backwards, (find_assert_locations_1): Walk the basic-block backwards,
......
...@@ -1297,11 +1297,11 @@ init_optimization_passes (void) ...@@ -1297,11 +1297,11 @@ init_optimization_passes (void)
NEXT_PASS (pass_remove_cgraph_callee_edges); NEXT_PASS (pass_remove_cgraph_callee_edges);
NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_ccp); NEXT_PASS (pass_ccp);
/* After CCP we rewrite no longer addressed locals into SSA
form if possible. */
NEXT_PASS (pass_forwprop); NEXT_PASS (pass_forwprop);
/* pass_build_ealias is a dummy pass that ensures that we /* pass_build_ealias is a dummy pass that ensures that we
execute TODO_rebuild_alias at this point. Re-building execute TODO_rebuild_alias at this point. */
alias information also rewrites no longer addressed
locals into SSA form if possible. */
NEXT_PASS (pass_build_ealias); NEXT_PASS (pass_build_ealias);
NEXT_PASS (pass_sra_early); NEXT_PASS (pass_sra_early);
NEXT_PASS (pass_fre); NEXT_PASS (pass_fre);
...@@ -1371,11 +1371,11 @@ init_optimization_passes (void) ...@@ -1371,11 +1371,11 @@ init_optimization_passes (void)
NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_complete_unrolli); NEXT_PASS (pass_complete_unrolli);
NEXT_PASS (pass_ccp); NEXT_PASS (pass_ccp);
/* After CCP we rewrite no longer addressed locals into SSA
form if possible. */
NEXT_PASS (pass_forwprop); NEXT_PASS (pass_forwprop);
/* pass_build_alias is a dummy pass that ensures that we /* pass_build_alias is a dummy pass that ensures that we
execute TODO_rebuild_alias at this point. Re-building execute TODO_rebuild_alias at this point. */
alias information also rewrites no longer addressed
locals into SSA form if possible. */
NEXT_PASS (pass_build_alias); NEXT_PASS (pass_build_alias);
NEXT_PASS (pass_return_slot); NEXT_PASS (pass_return_slot);
NEXT_PASS (pass_phiprop); NEXT_PASS (pass_phiprop);
...@@ -1414,6 +1414,8 @@ init_optimization_passes (void) ...@@ -1414,6 +1414,8 @@ init_optimization_passes (void)
NEXT_PASS (pass_object_sizes); NEXT_PASS (pass_object_sizes);
NEXT_PASS (pass_strlen); NEXT_PASS (pass_strlen);
NEXT_PASS (pass_ccp); 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_copy_prop);
NEXT_PASS (pass_cse_sincos); NEXT_PASS (pass_cse_sincos);
NEXT_PASS (pass_optimize_bswap); NEXT_PASS (pass_optimize_bswap);
...@@ -1773,13 +1775,10 @@ execute_function_todo (void *data) ...@@ -1773,13 +1775,10 @@ execute_function_todo (void *data)
cfun->last_verified &= ~TODO_verify_ssa; cfun->last_verified &= ~TODO_verify_ssa;
} }
if (flags & TODO_rebuild_alias) if (flag_tree_pta && (flags & TODO_rebuild_alias))
{ compute_may_aliases ();
execute_update_addresses_taken ();
if (flag_tree_pta) if (optimize && (flags & TODO_update_address_taken))
compute_may_aliases ();
}
else if (optimize && (flags & TODO_update_address_taken))
execute_update_addresses_taken (); execute_update_addresses_taken ();
if (flags & TODO_remove_unused_locals) if (flags & TODO_remove_unused_locals)
......
2012-09-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54565
* gcc.dg/tree-ssa/ssa-ccp-17.c: Adjust.
* gcc.dg/tree-ssa/forwprop-6.c: Likewise. Remove XFAIL.
2012-09-14 Ulrich Weigand <ulrich.weigand@linaro.org> 2012-09-14 Ulrich Weigand <ulrich.weigand@linaro.org>
* gcc.target/arm/combine-movs.c: Add missing space. * gcc.target/arm/combine-movs.c: Add missing space.
......
...@@ -22,6 +22,7 @@ void f(void) ...@@ -22,6 +22,7 @@ void f(void)
particular situation before doing this transformation we have to particular situation before doing this transformation we have to
assure that a is killed by a dominating store via type float for 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 it to be valid. Then we might as well handle the situation by
value-numbering, removing the load alltogether. */ value-numbering, removing the load alltogether.
/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" { xfail *-*-* } } } */ ??? 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" } } */ /* { dg-final { cleanup-tree-dump "forwprop1" } } */
...@@ -26,7 +26,7 @@ int foobar(void) ...@@ -26,7 +26,7 @@ int foobar(void)
return ((const struct Foo *)p)->i; return ((const struct Foo *)p)->i;
} }
/* { dg-final { scan-tree-dump "= i;" "ccp1" } } */ /* { dg-final { scan-tree-dump "= i_.;" "ccp1" } } */
/* { dg-final { scan-tree-dump "= f.i;" "ccp1" } } */ /* { dg-final { scan-tree-dump "= f.i;" "ccp1" } } */
/* { dg-final { scan-tree-dump "= g.i;" "ccp1" } } */ /* { dg-final { scan-tree-dump "= g.i;" "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */ /* { dg-final { cleanup-tree-dump "ccp1" } } */
...@@ -2134,6 +2134,7 @@ struct gimple_opt_pass pass_ccp = ...@@ -2134,6 +2134,7 @@ struct gimple_opt_pass pass_ccp =
0, /* properties_destroyed */ 0, /* properties_destroyed */
0, /* todo_flags_start */ 0, /* todo_flags_start */
TODO_verify_ssa TODO_verify_ssa
| TODO_update_address_taken
| TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */ | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment