diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-06-01 14:52:08 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-06-01 14:52:08 +0200 |
commit | b6156cf232517d1ee6c8192b74a090655712c8c3 (patch) | |
tree | a47899351ddffe0b1cf21b848d366c52b797949b /gcc | |
parent | 6c059f76e7d799efdcccdcd4790df14e84f962a7 (diff) | |
download | gcc-b6156cf232517d1ee6c8192b74a090655712c8c3.zip gcc-b6156cf232517d1ee6c8192b74a090655712c8c3.tar.gz gcc-b6156cf232517d1ee6c8192b74a090655712c8c3.tar.bz2 |
ipa-utils.c (searchc_env): New field allow_overwritable.
2011-06-01 Martin Jambor <mjambor@suse.cz>
* ipa-utils.c (searchc_env): New field allow_overwritable.
(searchc): do not ignore edges to overwritable nodes if indicated
by env->allow_overwritable.
(ipa_reduced_postorder): Set env.allow_overwritable.
From-SVN: r174523
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ipa-utils.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8bac875..add1fa2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-06-01 Martin Jambor <mjambor@suse.cz> + + * ipa-utils.c (searchc_env): New field allow_overwritable. + (searchc): do not ignore edges to overwritable nodes if indicated + by env->allow_overwritable. + (ipa_reduced_postorder): Set env.allow_overwritable. + 2011-06-01 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data): Do not reset boolean_type_node nor diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c index de4f4b6..f60ce2f 100644 --- a/gcc/ipa-utils.c +++ b/gcc/ipa-utils.c @@ -67,6 +67,7 @@ struct searchc_env { int order_pos; splay_tree nodes_marked_new; bool reduce; + bool allow_overwritable; int count; }; @@ -101,11 +102,14 @@ searchc (struct searchc_env* env, struct cgraph_node *v, { struct ipa_dfs_info * w_info; struct cgraph_node *w = edge->callee; + enum availability avail = cgraph_function_body_availability (w); if (ignore_edge && ignore_edge (edge)) continue; - if (w->aux && cgraph_function_body_availability (edge->callee) > AVAIL_OVERWRITABLE) + if (w->aux + && (avail > AVAIL_OVERWRITABLE + || (env->allow_overwritable && avail == AVAIL_OVERWRITABLE))) { w_info = (struct ipa_dfs_info *) w->aux; if (w_info->new_node) @@ -171,6 +175,7 @@ ipa_reduced_postorder (struct cgraph_node **order, env.nodes_marked_new = splay_tree_new (splay_tree_compare_ints, 0, 0); env.count = 1; env.reduce = reduce; + env.allow_overwritable = allow_overwritable; for (node = cgraph_nodes; node; node = node->next) { |