You will have a followup patch to override arm defaults, right? Ok for
google/main.

Thanks,

David

On Tue, May 17, 2011 at 9:29 PM, Mark Heffernan <meh...@google.com> wrote:
> This tiny change improves the size estimation for inlining and results in an
> average 1% size reduction and a small (maybe 0.25% geomean) performance
> increase on internal benchmarks on x86-64.  I parameterized the value rather
> than changing it directly because previous exploration with x86 and ARM
> arches indicated that it varies significantly with architecture.  Default
> value is tuned for x86-64.
> Bootstrapped and tested on x86-64.  Will explore relevance and effectiveness
> for trunk and SPEC later.
> Ok for google/main?
> Mark
> 2011-05-17  Mark Heffernan  <meh...@google.com>
>
>
>
>
>
>        * ipa-inline.c (estimate_function_body_sizes): Parameterize static
>
>
>        function static overhead.
>
>
>        * params.def (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE): New parameter.
> Index: ipa-inline.c
> ===================================================================
> --- ipa-inline.c (revision 173845)
> +++ ipa-inline.c (working copy)
> @@ -1979,10 +1979,11 @@ estimate_function_body_sizes (struct cgr
>    gcov_type time = 0;
>    gcov_type time_inlining_benefit = 0;
>    /* Estimate static overhead for function prologue/epilogue and alignment.
> */
> -  int size = 2;
> +  int size = PARAM_VALUE (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE);
>    /* Benefits are scaled by probability of elimination that is in range
>       <0,2>.  */
> -  int size_inlining_benefit = 2 * 2;
> +  int size_inlining_benefit =
> +    PARAM_VALUE (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE) * 2;
>    basic_block bb;
>    gimple_stmt_iterator bsi;
>    struct function *my_function = DECL_STRUCT_FUNCTION (node->decl);
> Index: params.def
> ===================================================================
> --- params.def (revision 173845)
> +++ params.def (working copy)
> @@ -110,6 +110,11 @@ DEFPARAM (PARAM_MIN_INLINE_RECURSIVE_PRO
>    "Inline recursively only when the probability of call being executed
> exceeds the parameter",
>    10, 0, 0)
>
> +DEFPARAM (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE,
> +  "inline-function-overhead-size",
> +  "Size estimate of function overhead (prologue and epilogue) for inlining
> purposes",
> +  7, 0, 0)
> +
>  /* Limit of iterations of early inliner.  This basically bounds number of
>     nested indirect calls early inliner can resolve.  Deeper chains are
> still
>     handled by late inlining.  */
>

Reply via email to