diff options
author | Jan Hubicka <jh@suse.cz> | 2011-04-27 00:05:50 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-04-26 22:05:50 +0000 |
commit | 898b8927465614b911841f134f37165a613debf5 (patch) | |
tree | 9dd85417eff67af5337a8aed679418604daf66df /gcc/ipa-inline.c | |
parent | ffa037724f62366e4e78b496f182d999ea7b75ce (diff) | |
download | gcc-898b8927465614b911841f134f37165a613debf5.zip gcc-898b8927465614b911841f134f37165a613debf5.tar.gz gcc-898b8927465614b911841f134f37165a613debf5.tar.bz2 |
cgraphbuild.c (build_cgraph_edges): Update call of cgraph_create_edge and cgraph_create_indirect_edge.
* cgraphbuild.c (build_cgraph_edges): Update call
of cgraph_create_edge and cgraph_create_indirect_edge.
* cgraph.c (cgraph_create_edge_including_clones,
cgraph_create_edge_1, cgraph_allocate_init_indirect_info,
cgraph_update_edges_for_call_stmt_node): Do not take nest
argument; do not initialize call_stmt_size/time.
(dump_cgraph_node): Do not dump nest.
(cgraph_clone_edge): Do not take loop_nest argument;
do not propagate it; do not clone call_stmt_size/time.
(cgraph_clone_node): Likewise.
(cgraph_create_virtual_clone): Update.
* cgraph.h (struct cgraph_edge): Remove
call_stmt_size/call_stmt_time/loop_nest.
(cgraph_create_edge, cgraph_create_indirect_edge,
cgraph_create_edge_including_clones, cgraph_clone_node): Update
prototype.
* tree-emutls.c (gen_emutls_addr): Update.
* ipa-inline-transform.c (update_noncloned_frequencies): Do not handle
loop_nest; handle indirect calls, too.
(clone_inlined_nodes): Do not care about updating inline summaries.
* cgraphunit.c (cgraph_copy_node_for_versioning): Update.
* lto-cgraph.c (lto_output_edge, input_node, input_edge): Do not
stream call_stmt_size/call_stmt_time/loop_nest.
* ipa-inline.c (edge_badness): Update.
(ipa_inline): dump summaries after inlining.
* ipa-inline.h (struct inline_edge_summary, inline_edge_summary_t):
new.
(inline_edge_summary): New function.
* ipa-inline-analysis.c (edge_duplication_hook_holder): New holder.
(inline_edge_removal_hook): Handle edge summaries.
(inline_edge_duplication_hook): New hook.
(inline_summary_alloc): Alloc hooks.
(initialize_growth_caches): Do not register removal hooks.
(free_growth_caches); Do not free removal hook.
(dump_inline_edge_summary): New function.
(dump_inline_summary): Use it.
(estimate_function_body_sizes, estimate_edge_size_and_time): Update.
(inline_update_callee_summaries): New function.
(inline_merge_summary): Use it.
(do_estimate_edge_time, do_estimate_edge_growth): Update.
(read_inline_edge_summary): New function.
(inline_read_section): Use it.
(write_inline_edge_summary): New function.
(inline_write_summary): Use it.
(inline_free_summary): Free edge new holders.
* tree-inline.c (copy_bb): Update.
From-SVN: r172989
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 02cc773..d4052df 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -739,7 +739,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) of functions fully inlined in program. */ else { - int nest = MIN (edge->loop_nest, 8); + int nest = MIN (inline_edge_summary (edge)->loop_depth, 8); badness = estimate_growth (edge->callee) * 256; /* Decrease badness if call is nested. */ @@ -1027,7 +1027,7 @@ recursive_inlining (struct cgraph_edge *edge, { /* We need original clone to copy around. */ master_clone = cgraph_clone_node (node, node->decl, - node->count, CGRAPH_FREQ_BASE, 1, + node->count, CGRAPH_FREQ_BASE, false, NULL); for (e = master_clone->callees; e; e = e->next_callee) if (!e->inline_failed) @@ -1555,6 +1555,8 @@ ipa_inline (void) "\nInlined %i calls, eliminated %i functions\n\n", ncalls_inlined, nfunctions_inlined); + if (dump_file) + dump_inline_summaries (dump_file); /* In WPA we use inline summaries for partitioning process. */ if (!flag_wpa) inline_free_summary (); @@ -1709,9 +1711,10 @@ early_inliner (void) info that might be cleared out for newly discovered edges. */ for (edge = node->callees; edge; edge = edge->next_callee) { - edge->call_stmt_size + struct inline_edge_summary *es = inline_edge_summary (edge); + es->call_stmt_size = estimate_num_insns (edge->call_stmt, &eni_size_weights); - edge->call_stmt_time + es->call_stmt_time = estimate_num_insns (edge->call_stmt, &eni_time_weights); } timevar_pop (TV_INTEGRATION); |