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++] Remove iffy uses of DECL_INLINE


On Fri, Jul 25, 2008 at 10:02 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Jan Hubicka wrote:
>>
>> >>I'm a little worried that because of the more generous definition of
>> >>possibly_inlined_p we'll synthesize more methods and such and thus slow
>> >>down the compiler.  Have you looked at compile-time or memory impact on,
>> >>say, libstdc++ compilation?
>> >
>> >I tested Gerald's testcase and saw no differences.
>>
>> When I read the patch, I realized that some of the changes were probably
>> unlikely to make a big difference in practice; I'm glad you looked at
>> it.  Go ahead with the patch.
>>
>> But, please do be aware that the template call graphs can be massive.
>> For certain classes of C++ programs, our default of -fimplicit-templates
>> is definitely not what you want -- you can end up with tons (tens of
>> thousands, or even hundreds of thousands) of template functions being
>> instantiated in every file because you include headers full of templates
>> and then call one of them which sets off a giant chain recaction.  You
>> really want to do these IPA optimizations on templates at link-time:
>> instantiate the functions once, then do inlining and other cleverness
>> across the entire application or library.  So, we should watch out for
>> this problem, not just because of this patch, but in general.
>
> OK, thanks!
> I will re-test with the NO_WARNING change.  I hope our C++ tester will
> cover this resonably well, I can also add some massive template thing
> into memory tester if we get better testcase than Gerald's one.

The C++ tester has some big MPL testcases (in the random/ section) and
of course there is always tramp3d ...

Richard.


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