This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sigh. Inlining heuristics.
- To: dewar at gnat dot com
- Subject: Re: Sigh. Inlining heuristics.
- From: Andi Kleen <ak at suse dot de>
- Date: 10 Jul 2001 13:28:17 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <20010710111038.6E52DF2B12@nile.gnat.com.suse.lists.egcs>
dewar@gnat.com writes:
>
> I would think that 100 is just fine, and I cannot imagine any user needing
> to deoptimize their program by cranking the number up (it is equally hard
> to imagine any program that would be measurably improved by the old limit,
> but very easy to imagine programs that are damaged).
I can easily imagine such a program. e.g. when you inline a 1000 instruction
function and 900 instructions of that are removed during constant
propagation and dead code remove later because the argument input values
are known then. Of course 100 is still a fine default.
i.e.
func1(int arg)
{
if (arg == 0) {
... do something long ...
}
...do some else long...
}
func2()
{
func1(1);
}
-Andi