aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-11-27 15:18:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-11-27 15:18:23 +0000
commite9287a41dffc9e76dd80be4be75b0c3a58f57231 (patch)
treea420c4091323d45ede618fbe00f2bb1785f9edf6 /gcc/tree-inline.c
parent3745a526d6e978059a3de751e302ecd2af88c0de (diff)
downloadgcc-e9287a41dffc9e76dd80be4be75b0c3a58f57231.zip
gcc-e9287a41dffc9e76dd80be4be75b0c3a58f57231.tar.gz
gcc-e9287a41dffc9e76dd80be4be75b0c3a58f57231.tar.bz2
re PR middle-end/58723 (ICE in lto_output_edge, at lto-cgraph.c:300 for OpenMP's simd reduction)
2013-11-27 Richard Biener <rguenther@suse.de> PR middle-end/58723 * cgraphbuild.c (build_cgraph_edges): Do not build edges for internal calls. (rebuild_cgraph_edges): Likewise. * ipa-inline-analysis.c (estimate_function_body_sizes): Skip internal calls. * tree-inline.c (estimate_num_insns): Estimate size of internal calls as 0. (gimple_expand_calls_inline): Do not try inline-expanding internal calls. * lto-streamer-in.c (input_cfg): Stream loop safelen, force_vect and simduid. (input_struct_function_base): Stream has_force_vect_loops and has_simduid_loops. (input_function): Adjust. * lto-streamer-out.c (output_cfg): Stream loop safelen, force_vect and simduid. (output_struct_function_base): Stream has_force_vect_loops and has_simduid_loops. From-SVN: r205447
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 0a6e0cd..f42ade02 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -3797,12 +3797,16 @@ estimate_num_insns (gimple stmt, eni_weights *weights)
case GIMPLE_CALL:
{
- tree decl = gimple_call_fndecl (stmt);
+ tree decl;
struct cgraph_node *node = NULL;
/* Do not special case builtins where we see the body.
This just confuse inliner. */
- if (!decl || !(node = cgraph_get_node (decl)) || node->definition)
+ if (gimple_call_internal_p (stmt))
+ return 0;
+ else if (!(decl = gimple_call_fndecl (stmt))
+ || !(node = cgraph_get_node (decl))
+ || node->definition)
;
/* For buitins that are likely expanded to nothing or
inlined do not account operand costs. */
@@ -4423,6 +4427,7 @@ gimple_expand_calls_inline (basic_block bb, copy_body_data *id)
gimple stmt = gsi_stmt (gsi);
if (is_gimple_call (stmt)
+ && !gimple_call_internal_p (stmt)
&& expand_call_inline (bb, stmt, id))
return true;
}