summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-03 18:16:26 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-03 18:16:26 +0000
commit1a1a827af5bd68fe66dfb0c7395e7f9feed273bd (patch)
tree2ec6cd14c2fd416d7473c8942ba129ded5f4824b /gcc/ipa-inline.c
parentc39dc254583ac605477aa1ee4de2154ba7559176 (diff)
downloadgcc-1a1a827af5bd68fe66dfb0c7395e7f9feed273bd.tar.gz
PR tree-optimization/37315
* cgraph.c (cgraph_create_edge): Use gimple_has_body_p. * cgraphunit.c (verify_cgraph_node): drop gimple_body check. (cgraph_analyze_functions): Use node->analyzed (cgraph_mark_functions_to_output): Likewise. (cgraph_expand_function): All functions can be released after expanding. (cgraph_optimize): Use gimple_has_body_p. * ipa-inline.c (cgraph_clone_inlined_nodes): Use analyzed flag. (cgraph_decide_inlining_incrementally): Likewise. (inline_transform): Inline transform. * tree-inline.c (initialize_cfun): Do now shallow copy structure; copy fields needed. (inlinable_function_p): Drop gimple_body check. (expand_call_inline): Use gimple_has_body_p. * gimple.c (gimple_has_body_p): New. * gimple.h (gimple_has_body_p): Add prototype. * tree-cfg.c (execute_build_cfg): Remove gimple_body. (dump_function_to_file): Use gimple_has_body_p check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 4c8096ae9b6..66b9bac79de 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -212,7 +212,7 @@ cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
&& !cgraph_new_nodes)
{
gcc_assert (!e->callee->global.inlined_to);
- if (gimple_body (e->callee->decl))
+ if (e->callee->analyzed)
overall_insns -= e->callee->global.insns, nfunctions_inlined++;
duplicate = false;
}
@@ -1388,7 +1388,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
}
continue;
}
- if (!gimple_body (e->callee->decl) && !e->callee->inline_decl)
+ if (!e->callee->analyzed && !e->callee->inline_decl)
{
if (dump_file)
{
@@ -1463,7 +1463,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
}
continue;
}
- if (!gimple_body (e->callee->decl) && !e->callee->inline_decl)
+ if (!e->callee->analyzed && !e->callee->inline_decl)
{
if (dump_file)
{
@@ -1706,7 +1706,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 (current_function_decl))
+ if (cgraph_preserve_function_body_p (node->decl))
save_inline_function_body (node);
for (e = node->callees; e; e = e->next_callee)