This is the mail archive of the
mailing list for the GCC project.
Re: 3.0 -finline-limit and c++
- To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Subject: Re: 3.0 -finline-limit and c++
- From: Teemu Torma <tot at trema dot com>
- Date: Thu, 31 May 2001 13:30:38 +0200
- CC: gcc at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- References: <Pine.BSF.firstname.lastname@example.org>
Gerald Pfeifer wrote:
> Indeed, I should add that part of the motivation for Mark to make this
> change was a (relatively simple though template heavy) code base of mine
> where GCC 2.95 had no problems at all and (then) current snapshots of
> GCC 3.0 crashed after consuming *all* memory -- and we're talking about
> an increase in memory consumption of at least 1000%.
> And, somehow, we are now back in that situation again and GCC 3.0 again
> consumes "infinitely" much memory for that code! :-(
I also noticed that it takes quite a long time to compile with default
settings--that is why I was trying to use -finline-limit to reduce
compile time and object size, with bad results. By disabling the inline
context check and using limit of 500 or 1000 insns, the compile time is
much faster with reasonable inlining. In my cases, that is.
> One thing I suggested to Mark is performing the inlining (resp. breaking
> of inline chains) bottom-up instead of top-down in the tree, which might
> help performance in some cases.
I think it is prerequisite to get context size working properly.
Preferably the functions should already be somewhat optimized to see the