cgraph_mark_needed_node (node);
}
-#ifdef ENABLE_CHECKING
/* Return TRUE if NODE2 is equivalent to NODE or its clone. */
static bool
clone_of_p (struct cgraph_node *node, struct cgraph_node *node2)
node2 = node2->clone_of;
return node2 != NULL;
}
-#endif
/* Verify edge E count and frequency. */
debug_tree (e->callee->decl);
error_found = true;
}
-#ifdef ENABLE_CHECKING
else if (!e->callee->global.inlined_to
&& decl
&& cgraph_get_node (decl)
debug_tree (decl);
error_found = true;
}
-#endif
}
else if (decl)
{
cgraph_materialize_clone (struct cgraph_node *node)
{
bitmap_obstack_initialize (NULL);
-#ifdef ENABLE_CHECKING
node->former_clone_of = node->clone_of->decl;
if (node->clone_of->former_clone_of)
node->former_clone_of = node->clone_of->former_clone_of;
-#endif
/* Copy the OLD_VERSION_NODE function tree to the new version. */
tree_function_versioning (node->clone_of->decl, node->decl,
node->clone.tree_map, true,
if (e->callee->clone.combined_args_to_skip)
{
gimple_stmt_iterator gsi;
+ int lp_nr;
new_stmt
= gimple_call_copy_skip_args (e->call_stmt,
gsi = gsi_for_stmt (e->call_stmt);
gsi_replace (&gsi, new_stmt, false);
- if (maybe_clean_or_replace_eh_stmt (e->call_stmt, new_stmt))
- gimple_purge_dead_eh_edges (gimple_bb (new_stmt));
+ /* We need to defer cleaning EH info on the new statement to
+ fixup-cfg. We may not have dominator information at this point
+ and thus would end up with unreachable blocks and have no way
+ to communicate that we need to run CFG cleanup then. */
+ lp_nr = lookup_stmt_eh_lp (e->call_stmt);
+ if (lp_nr != 0)
+ {
+ remove_stmt_from_eh_lp (e->call_stmt);
+ add_stmt_to_eh_lp (new_stmt, lp_nr);
+ }
}
else
{
new_stmt = e->call_stmt;
gimple_call_set_fndecl (new_stmt, e->callee->decl);
update_stmt (new_stmt);
- if (maybe_clean_eh_stmt (new_stmt))
- gimple_purge_dead_eh_edges (gimple_bb (new_stmt));
}
cgraph_set_call_stmt_including_clones (e->caller, e->call_stmt, new_stmt);