This is the mail archive of the gcc@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]

Re: Sigh. Inlining heuristics.


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


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