diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-04-11 17:17:44 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-04-11 17:17:44 +0200 |
commit | 9f9ebcdfc635e94463350898b625e0f3b1431ec0 (patch) | |
tree | 2c3c04107c858150dae9c1fa382093e2fa6bd141 /gcc/tree-inline.c | |
parent | 581985d71026fb5cf52fef156b76a619ce07e88c (diff) | |
download | gcc-9f9ebcdfc635e94463350898b625e0f3b1431ec0.tar.gz |
cgraph.c (cgraph_local_info): Call cgraph_get_node instead of cgraph_node, handle NULL return value.
2011-04-11 Martin Jambor <mjambor@suse.cz>
gcc/
* cgraph.c (cgraph_local_info): Call cgraph_get_node instead
of cgraph_node, handle NULL return value.
(cgraph_global_info): Likewise.
(cgraph_rtl_info): Likewise.
* tree-inline.c (estimate_num_insns): Likewise.
* gimplify.c (unshare_body): Likewise.
(unvisit_body): Likewise.
(gimplify_body): Likewise.
* predict.c (optimize_function_for_size_p): Likewise.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
(call_may_clobber_ref_p_1): Likewise.
* varasm.c (function_section_1): Likewise.
(assemble_start_function): Likewise.
gcc/java/
* decl.c (java_mark_decl_local): Call cgraph_get_node instead of
cgraph_node and handle returned NULL.
From-SVN: r172258
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 25d3e26badf..140d7781c84 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3470,10 +3470,11 @@ estimate_num_insns (gimple stmt, eni_weights *weights) case GIMPLE_CALL: { tree decl = gimple_call_fndecl (stmt); + struct cgraph_node *node; /* Do not special case builtins where we see the body. This just confuse inliner. */ - if (!decl || cgraph_node (decl)->analyzed) + if (!decl || !(node = cgraph_get_node (decl)) || node->analyzed) ; /* For buitins that are likely expanded to nothing or inlined do not account operand costs. */ |