aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-09-03 20:16:26 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-09-03 18:16:26 +0000
commit39ecc018798bc85d22bfc3c3155986ab5b35f5ac (patch)
tree2ec6cd14c2fd416d7473c8942ba129ded5f4824b /gcc/cgraph.c
parentcafea0e43647f764861b625232460c584fe11086 (diff)
downloadgcc-39ecc018798bc85d22bfc3c3155986ab5b35f5ac.zip
gcc-39ecc018798bc85d22bfc3c3155986ab5b35f5ac.tar.gz
gcc-39ecc018798bc85d22bfc3c3155986ab5b35f5ac.tar.bz2
re PR tree-optimization/37315 (gcc.c-torture/execute/931018-1.c int-compare.c ieee/inf-2.c mzero6.c)
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. From-SVN: r139945
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 54d5fad..a12ed15 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -645,7 +645,7 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
gcc_assert (is_gimple_call (call_stmt));
- if (!gimple_body (callee->decl))
+ if (!callee->analyzed)
edge->inline_failed = N_("function body not available");
else if (callee->local.redefined_extern_inline)
edge->inline_failed = N_("redefined extern inline functions are not "
@@ -1073,7 +1073,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " needed");
else if (node->reachable)
fprintf (f, " reachable");
- if (gimple_body (node->decl))
+ if (gimple_has_body_p (node->decl))
fprintf (f, " body");
if (node->output)
fprintf (f, " output");