diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-04-29 23:42:15 +0000 |
---|---|---|
committer | Martin Jambor <mjambor@suse.cz> | 2011-04-29 23:42:15 +0000 |
commit | 8e77507786ca0f8bbda0dfbeaa7904eed8abb3bf (patch) | |
tree | 223bf74a250abe0577f81e8a0db2cdb8f7243fd6 /gcc/ipa-pure-const.c | |
parent | aa4c8a5366c6190e5ee406685f35a45d784ed0f6 (diff) |
2011-04-29 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_postorder): Remove declaration.
* ipa-utils.h (ipa_free_postorder_info): Declare.
(ipa_reverse_postorder): Likewise.
* cgraphunit.c: Include ipa-utils.h.
(cgraph_expand_all_functions): Update call to ipa_reverse_postorder.
* ipa-inline.c: Include ipa-utils.h.
(ipa_inline): Update call to ipa_reverse_postorder.
* ipa-pure-const.c (propagate_pure_const): Update call to
ipa_reduced_postorder and ipa_print_order. Call
ipa_free_postorder_info to clean up.
(propagate_nothrow): Likewise.
* ipa-reference.c (propagate): Removed a useless call to
ipa_utils_reduced_inorder, updated a call to ipa_reduced_postorder
and ipa_print_order. Call ipa_free_postorder_info to clean up.
* ipa.c: Include ipa-utils.h.
(ipa_profile): Update call to ipa_reverse_postorder.
(cgraph_postorder): Moved to...
* ipa-utils.c (ipa_reverse_postorder): ...here and renamed.
(ipa_utils_print_order): Renamed to ipa_print_order.
(ipa_utils_reduced_inorder): Renamed to ipa_reduced_postorder. Updated
comments.
(ipa_free_postorder_info): New function.
* passes.c: Include ipa-utils.h.
(do_per_function_toporder): Update call to ipa_reverse_postorder.
(ipa_write_summaries): Likewise.
* Makefile.in (passes.o): Add IPA_UTILS_H to dependencies.
(cgraphunit.o): Likewise.
(ipa.o): Likewise.
(ipa-inline.o): Likewise.
lto/
* lto.c: Include ipa-utils.h.
(lto_balanced_map): Update call to ipa_reverse_postorder.
* Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@173197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 67022c4edbb..cd575374563 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1089,11 +1089,11 @@ propagate_pure_const (void) int i; struct ipa_dfs_info * w_info; - order_pos = ipa_utils_reduced_inorder (order, true, false, NULL); + order_pos = ipa_reduced_postorder (order, true, false, NULL); if (dump_file) { dump_cgraph (dump_file); - ipa_utils_print_order(dump_file, "reduced", order, order_pos); + ipa_print_order(dump_file, "reduced", order, order_pos); } /* Propagate the local information thru the call graph to produce @@ -1339,18 +1339,7 @@ propagate_pure_const (void) } } - /* Cleanup. */ - for (node = cgraph_nodes; node; node = node->next) - { - /* Get rid of the aux information. */ - if (node->aux) - { - w_info = (struct ipa_dfs_info *) node->aux; - free (node->aux); - node->aux = NULL; - } - } - + ipa_free_postorder_info (); free (order); } @@ -1368,11 +1357,11 @@ propagate_nothrow (void) int i; struct ipa_dfs_info * w_info; - order_pos = ipa_utils_reduced_inorder (order, true, false, ignore_edge); + order_pos = ipa_reduced_postorder (order, true, false, ignore_edge); if (dump_file) { dump_cgraph (dump_file); - ipa_utils_print_order(dump_file, "reduced for nothrow", order, order_pos); + ipa_print_order (dump_file, "reduced for nothrow", order, order_pos); } /* Propagate the local information thru the call graph to produce @@ -1445,18 +1434,7 @@ propagate_nothrow (void) } } - /* Cleanup. */ - for (node = cgraph_nodes; node; node = node->next) - { - /* Get rid of the aux information. */ - if (node->aux) - { - w_info = (struct ipa_dfs_info *) node->aux; - free (node->aux); - node->aux = NULL; - } - } - + ipa_free_postorder_info (); free (order); } |