[PATCH] Cost of inlining when the function has call to a target-specific builtin

Richard Guenther richard.guenther@gmail.com
Sun Sep 16 20:22:00 GMT 2007


On 9/16/07, Pranav Bhandarkar <pranav.bhandarkar@gmail.com> wrote:
> Hi,
> While inlining, the cost of a call to a target-specific builtin is
> assumed to be the same as that of a call to any other function by
> tree-inline.c. This patch allows the backend to examine the builtin
> and suggest an appropriate value.

This doesn't fit with the modularized cost metrics we have.  That is,
estimate_num_insns_1 is not only used for inlining.

Richard.

> 2007-09-16  Pranav Bhandarkar  <pranav.bhandarkar@celunite.com>
>             Ramana Radhakrishnan  <ramana.radhakrishnan@celunite.com>
>
>         * target.h (inline_builtin_call): New hook.
>         * expr.h (default_inline_builtin_call): New.
>         * builtins.c (params.h): Include.
>         (default_inline_builtin_call): New. Define.
>         * target-def.h (TARGET_INLINE_BUILTIN_CALL): New
>         (TARGET_INITIALIZER): Add TARGET_INLINE_BUILTIN_CALL.
>         * tree-inline.c (estimate_num_insns_1): For CALL_EXPR check for
>         target-specific builtin. If so get the cost for inlining from the backend.
>
>
> Is this ok ?
>
> cheers!
> Pranav
>
>



More information about the Gcc-patches mailing list