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: [tree-ssa] Generic estimate_num_insns


On Wed, 22 Oct 2003 00:11:06 +0200, Jan Hubicka <jh@suse.cz> wrote:

> +     /* Few special cases of expensive operations.  This is usefull
> +        to avoid inlining on functions having too many of these.  */
> +     case TRUNC_DIV_EXPR:
> +     case CEIL_DIV_EXPR:
> +     case FLOOR_DIV_EXPR:
> +     case ROUND_DIV_EXPR:
> +     case EXACT_DIV_EXPR:
> +     case TRUNC_MOD_EXPR:
> +     case CEIL_MOD_EXPR:
> +     case FLOOR_MOD_EXPR:
> +     case ROUND_MOD_EXPR:
> +     case RDIV_EXPR:
> +     case CALL_EXPR:
> +     case RESX_EXPR:

I would argue with RESX_EXPR.  Inlining a function containing RESX_EXPR can
cause it to expand to a simple jump, whereas out-of-line it would be a call
into the EH runtime.

Besides, I don't think the runtime cost of expressions is what we're
interested in when inlining--rather, we're interested in the text size.
The actual number of instructions, not how fast they run.

Jason


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