From 85057983ac31039dff4e0963b789ee6684351868 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 25 May 2009 23:59:24 +0200 Subject: cgraph.c (dump_cgraph_node): Dump size/time/benefit. * 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. (leaf_node_p): New. (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. From-SVN: r147852 --- gcc/cgraph.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc/cgraph.h') diff --git a/gcc/cgraph.h b/gcc/cgraph.h index d391202d2d0..1f05eedf698 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -55,8 +55,14 @@ struct GTY(()) inline_summary /* Estimated stack frame consumption by the function. */ HOST_WIDE_INT estimated_self_stack_size; - /* Size of the function before inlining. */ - int self_insns; + /* Size of the function body. */ + int self_size; + /* How many instructions are likely going to disappear after inlining. */ + int size_inlining_benefit; + /* Estimated time spent executing the function body. */ + int self_time; + /* How much time is going to be saved by inlining. */ + int time_inlining_benefit; }; /* Information about the function collected locally. @@ -108,7 +114,8 @@ struct GTY(()) cgraph_global_info { struct cgraph_node *inlined_to; /* Estimated size of the function after inlining. */ - int insns; + int time; + int size; /* Estimated growth after inlining. INT_MIN if not computed. */ int estimated_growth; -- cgit v1.2.1