+2011-04-29 Martin Jambor <mjambor@suse.cz>
+
+ * cgraphunit.c (cgraph_preserve_function_body_p): Accept a cgraph
+ node instead of a decl. Update all callers.
+ * cgraph.h: Update declaration.
+
2011-04-28 Ira Rosen <ira.rosen@linaro.org>
PR tree-optimization/48765
void cgraph_mark_address_taken_node (struct cgraph_node *);
void cgraph_mark_reachable_node (struct cgraph_node *);
bool cgraph_inline_p (struct cgraph_edge *, cgraph_inline_failed_t *reason);
-bool cgraph_preserve_function_body_p (tree);
+bool cgraph_preserve_function_body_p (struct cgraph_node *);
void verify_cgraph (void);
void verify_cgraph_node (struct cgraph_node *);
void cgraph_build_static_cdtor (char which, tree body, int priority);
/* Make sure that BE didn't give up on compiling. */
gcc_assert (TREE_ASM_WRITTEN (decl));
current_function_decl = NULL;
- gcc_assert (!cgraph_preserve_function_body_p (decl));
+ gcc_assert (!cgraph_preserve_function_body_p (node));
cgraph_release_function_body (node);
/* Eliminate all call edges. This is important so the GIMPLE_CALL no longer
points to the dead function body. */
/* Return true when function body of DECL still needs to be kept around
for later re-use. */
bool
-cgraph_preserve_function_body_p (tree decl)
+cgraph_preserve_function_body_p (struct cgraph_node *node)
{
- struct cgraph_node *node;
-
gcc_assert (cgraph_global_info_ready);
+ gcc_assert (!node->same_body_alias);
+
/* Look if there is any clone around. */
- node = cgraph_get_node (decl);
if (node->clones)
return true;
return false;
/* We might need the body of this function so that we can expand
it inline somewhere else. */
- if (cgraph_preserve_function_body_p (node->decl))
+ if (cgraph_preserve_function_body_p (node))
save_inline_function_body (node);
for (e = node->callees; e; e = e->next_callee)