This is the mail archive of the 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: 3.0 -finline-limit and c++

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
> compile-times.

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"

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