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: C++ PATCH: PR 11131


On Tue, 2003-06-10 at 01:47, Richard Guenther wrote:
> diff -c -5 -p -r1.326 tree.c
> *** cp/tree.c	17 May 2003 22:21:35 -0000	1.326
> --- cp/tree.c	10 Jun 2003 07:07:02 -0000
> *************** int
> *** 2202,2224 ****
> [...]
> +   if (!DECL_INLINE (fn))
> +     return 1;
> 
> wont this break
> 
>     else if (! DECL_INLINE (fn) && !nolimit)
> !     inlinable = 0;
> 
> from inlinable_function_p()? I.e. if nolimit is set, this doesnt do what
> it did before. Why did you add this check to cp_cannot_inline_tree_fn() in
> the first place?

It was attempt at an optimization, but you're right -- it's not quite
right.

One problem is that we don't have "nolimit" passed down into the
cp_cannot_inline_tree_fn hook, so we can't know whether or not to
instantiate all functions.

I'll spin up another patch right now, to fix the problem you note, but
it won't fix the other issue I mention above.  Even with nolimit, I'll
not be instantiating everything, which means that some inlining
opportunities will be missed in that mode.

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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