This is the mail archive of the
mailing list for the GCC project.
Re: 3.0 -finline-limit and c++
- To: <gcc at gcc dot gnu dot org>
- Subject: Re: 3.0 -finline-limit and c++
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Thu, 31 May 2001 07:09:33 +0200 (CEST)
- cc: Mark Mitchell <mark at codesourcery dot com>, <tot at trema dot com>
On Fri, 25 May 2001, Mark Mitchell wrote:
> Your approach is unsafe in that you can have a very, very long (even
> exponentially long) series of small inline functions that together
> produce a very, very huge function.
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! :-(
> The current tree-based inlining heuristics are not ideal -- but they
> do go a long ways towards making sure that we have non-infinite
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.
Gerald "Jerry" firstname.lastname@example.org http://www.dbai.tuwien.ac.at/~pfeifer/