aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-04-14 15:26:44 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-04-14 13:26:44 +0000
commit10a5dd5d3d4cc53613b8e44b78e99b7d61f85d77 (patch)
treeeb6e4c913e14b3874133c0765b5a7b51b8c55868 /gcc/ipa-cp.c
parentb602d918bc8a134e29e065c38776ecf1a382e932 (diff)
downloadgcc-10a5dd5d3d4cc53613b8e44b78e99b7d61f85d77.zip
gcc-10a5dd5d3d4cc53613b8e44b78e99b7d61f85d77.tar.gz
gcc-10a5dd5d3d4cc53613b8e44b78e99b7d61f85d77.tar.bz2
cgraph.c (dump_cgraph_node): Do not dump inline summaries.
* cgraph.c (dump_cgraph_node): Do not dump inline summaries. * cgraph.h (struct inline_summary): Move to ipa-inline.h (cgraph_local_info): Remove inline_summary. * ipa-cp.c: Include ipa-inline.h. (ipcp_cloning_candidate_p, ipcp_estimate_growth, ipcp_estimate_cloning_cost, ipcp_insert_stage): Use inline_summary accesor. * lto-cgraph.c (lto_output_node): Do not stream inline summary. (input_overwrite_node): Do not set inline summary. (input_node): Do not stream inline summary. * ipa-inline.c (cgraph_decide_inlining): Dump inline summaries. (cgraph_decide_inlining_incrementally): Do not try to estimate overall growth; we do not have inline parameters computed for that anyway. (cgraph_early_inlining): After inlining compute call_stmt_sizes. * ipa-inline.h (struct inline_summary): Move here from ipa-inline.h (inline_summary_t): New type and VECtor. (debug_inline_summary, dump_inline_summaries): Declare. (inline_summary): Use VOCtor. (estimate_edge_growth): Kill hack computing call stmt size directly. * lto-section-in.c (lto_section_name): Add inline section. * ipa-inline-analysis.c: Include lto-streamer.h (node_removal_hook_holder, node_duplication_hook_holder): New holders (inline_node_removal_hook, inline_node_duplication_hook): New functions. (inline_summary_vec): Define. (inline_summary_alloc, dump_inline_summary, debug_inline_summary, dump_inline_summaries): New functions. (estimate_function_body_sizes): Properly compute size/time of outgoing calls. (compute_inline_parameters): Alloc inline_summary; do not compute size/time of incomming calls. (estimate_edge_time): Avoid missing time summary hack. (inline_read_summary): Read inline summary info. (inline_write_summary): Write inline summary info. (inline_free_summary): Free all hooks and inline summary vector. * lto-streamer.h: Add LTO_section_inline_summary section. * Makefile.in (ipa-cp.o, ipa-inline-analysis.o): Update dependencies. * ipa.c (cgraph_remove_unreachable_nodes): Fix dump file formating. * lto.c: Include ipa-inline.h (add_cgraph_node_to_partition, undo_partition): Use inline_summary accessor. (ipa_node_duplication_hook): Fix declaration. * Make-lang.in (lto.o): Update dependencies. From-SVN: r172430
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index a2928db..4cee1d4 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -148,6 +148,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "fibheap.h"
#include "params.h"
+#include "ipa-inline.h"
/* Number of functions identified as candidates for cloning. When not cloning
we can simplify iterate stage not forcing it to go through the decision
@@ -495,7 +496,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
cgraph_node_name (node));
return false;
}
- if (node->local.inline_summary.self_size < n_calls)
+ if (inline_summary (node)->self_size < n_calls)
{
if (dump_file)
fprintf (dump_file, "Considering %s for cloning; code would shrink.\n",
@@ -1189,7 +1190,7 @@ ipcp_estimate_growth (struct cgraph_node *node)
call site. Precise cost is difficult to get, as our size metric counts
constants and moves as free. Generally we are looking for cases that
small function is called very many times. */
- growth = node->local.inline_summary.self_size
+ growth = inline_summary (node)->self_size
- removable_args * redirectable_node_callers;
if (growth < 0)
return 0;
@@ -1229,7 +1230,7 @@ ipcp_estimate_cloning_cost (struct cgraph_node *node)
cost /= freq_sum * 1000 / REG_BR_PROB_BASE + 1;
if (dump_file)
fprintf (dump_file, "Cost of versioning %s is %i, (size: %i, freq: %i)\n",
- cgraph_node_name (node), cost, node->local.inline_summary.self_size,
+ cgraph_node_name (node), cost, inline_summary (node)->self_size,
freq_sum);
return cost + 1;
}
@@ -1364,7 +1365,7 @@ ipcp_insert_stage (void)
{
if (node->count > max_count)
max_count = node->count;
- overall_size += node->local.inline_summary.self_size;
+ overall_size += inline_summary (node)->self_size;
}
max_new_size = overall_size;