Commit 85ad2ef5 by Martin Jambor Committed by Martin Jambor

cgraphunit.c (cgraph_preserve_function_body_p): Accept a cgraph node instead of a decl.

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.

From-SVN: r173138
parent 74c810bd
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
......
......@@ -573,7 +573,7 @@ void cgraph_mark_needed_node (struct cgraph_node *);
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);
......
......@@ -1580,7 +1580,7 @@ cgraph_expand_function (struct cgraph_node *node)
/* 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. */
......@@ -1758,13 +1758,12 @@ cgraph_output_in_order (void)
/* 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;
......
......@@ -297,7 +297,7 @@ inline_transform (struct cgraph_node *node)
/* 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment