diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-14 12:22:27 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-14 12:22:27 +0000 |
commit | 5b48275ceb34adedafd131a8e7f2355bc0063c1e (patch) | |
tree | 3f4bf74f7c4398502fbe199fba391b9d37626158 | |
parent | 236745b6e0c7149fd71e0cccef86f55169dc7abe (diff) | |
download | gcc-5b48275ceb34adedafd131a8e7f2355bc0063c1e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191295 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/passes.c | 25 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 1 |
6 files changed, 31 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5da3ab6b0c..f1aedb2361a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 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, diff --git a/gcc/passes.c b/gcc/passes.c index e6a4f93adfa..a47068d25b9 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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e27f304c65f..e274bc348c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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> * gcc.target/arm/combine-movs.c: Add missing space. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c index 54e51097e4c..a7a4a41d876 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c @@ -22,6 +22,7 @@ void f(void) 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" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c index aece3c7cdc7..338d8a86297 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c @@ -26,7 +26,7 @@ int foobar(void) 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 "= g.i;" "ccp1" } } */ /* { dg-final { cleanup-tree-dump "ccp1" } } */ diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 830f6f33460..bf684749926 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2134,6 +2134,7 @@ struct gimple_opt_pass pass_ccp = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_verify_ssa + | TODO_update_address_taken | TODO_verify_stmts | TODO_ggc_collect/* todo_flags_finish */ } }; |