This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]