===================================================================
@@ -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
{
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_nod
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)
{