This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Generic estimate_num_insns
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 21 Oct 2003 18:38:29 -0400
- Subject: Re: [tree-ssa] Generic estimate_num_insns
- References: <20031021221106.GH6212@kam.mff.cuni.cz>
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