summaryrefslogtreecommitdiffstats
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 09:53:18 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 09:53:18 +0000
commit9288864f7b4ffa137ee0d71790a129c33298d071 (patch)
tree3b6a0db9e523f95f8ff7e24dd070b589651cf51b /gcc/cgraph.c
parenta0f312e306b5879dd1d36c32e8fc1a46a5b27852 (diff)
downloadppe42-gcc-9288864f7b4ffa137ee0d71790a129c33298d071.tar.gz
ppe42-gcc-9288864f7b4ffa137ee0d71790a129c33298d071.zip
* cgraph.c (dump_cgraph_node): Dump size/time/benefit.
* cgraph.h (struct inline_summary): New filed self_wize, size_inlining_benefit, self_time and time_inlining_benefit. (struct cgraph_global_info): Replace insns by time ans size fields. * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size (ipcp_estimate_growth, ipcp_insert_stage): Likewise. (ipcp_update_callgraph): Do not touch function bodies. * ipa-inline.c: Include except.h MAX_TIME: New constant. (overall_insns): Remove (overall_size, max_benefit): New static variables. (cgraph_estimate_time_after_inlining): New function. (cgraph_estimate_size_after_inlining): Rewrite using benefits. (cgraph_clone_inlined_nodes): Update size. (cgraph_mark_inline_edge): Update size. (cgraph_estimate_growth): Use size info. (cgraph_check_inline_limits): Check size. (cgraph_default_inline_p): Likewise. (cgraph_edge_badness): Compute badness based on benefit and size cost. (cgraph_decide_recursive_inlining): Check size. (cgraph_decide_inlining_of_small_function): Update size; dump sizes and times. (cgraph_decide_inlining): Likewise. (cgraph_decide_inlining_incrementally): Likewise; honor PARAM_EARLY_INLINING_INSNS. (likely_eliminated_by_inlining_p): New predicate. (estimate_function_body_sizes): New function. (compute_inline_parameters): Use it. * except.c (must_not_throw_labels): New function. * except.h (must_not_throw_labels): Declare. * tree-inline.c (init_inline_once): Kill inlining_weigths * tree-ssa-structalias.c: Avoid uninitialized warning. * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300. (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60. (PARAM_INLINE_CALL_COST): Remove. (PARAM_EARLY_INLINING_INSNS): New. doc/invoke.texi (max-inline-insns-auto, early-inlining-insns): Update. (inline-call-cost): Remove. (early-inlining-insns): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147566 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 60ff1685dc9..c7939b9d2c4 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1393,11 +1393,18 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
if (node->count)
fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
(HOST_WIDEST_INT)node->count);
- if (node->local.inline_summary.self_insns)
- fprintf (f, " %i insns", node->local.inline_summary.self_insns);
- if (node->global.insns && node->global.insns
- != node->local.inline_summary.self_insns)
- fprintf (f, " (%i after inlining)", node->global.insns);
+ if (node->local.inline_summary.self_time)
+ fprintf (f, " %i time, %i benefit", node->local.inline_summary.self_time,
+ node->local.inline_summary.time_inlining_benefit);
+ if (node->global.time && node->global.time
+ != node->local.inline_summary.self_time)
+ fprintf (f, " (%i after inlining)", node->global.time);
+ if (node->local.inline_summary.self_size)
+ fprintf (f, " %i size, %i benefit", node->local.inline_summary.self_size,
+ node->local.inline_summary.size_inlining_benefit);
+ if (node->global.size && node->global.size
+ != node->local.inline_summary.self_size)
+ fprintf (f, " (%i after inlining)", node->global.size);
if (node->local.inline_summary.estimated_self_stack_size)
fprintf (f, " %i bytes stack usage", (int)node->local.inline_summary.estimated_self_stack_size);
if (node->global.estimated_stack_size != node->local.inline_summary.estimated_self_stack_size)
OpenPOWER on IntegriCloud