From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Sidwell To: Daniel Berlin Cc: Mark Mitchell , "gcc@gcc.gnu.org" Subject: Re: Inlining heuristics for C++ Date: Tue, 10 Jul 2001 02:47:00 -0000 Message-id: <3B4ACF08.5B220781@codesourcery.com> References: <398850000.994745191@warlock.codesourcery.com> X-SW-Source: 2001-07/msg00739.html Mark Mitchell wrote: > > --On Monday, July 09, 2001 09:46:59 PM -0400 Daniel Berlin > wrote: > I think your ideas are reasonable. Nathan Sidwell has been thinking > about these issues, too; you should coordinate with him to try to > get some decent ideas and some decent measurements. Yes, and I'm making good progress. I have significantly reduced the compile time time and memory requirements. One of Geralds test cases now takes 112MB and 87 seconds instead of 279MB and 1133 seconds (that went into swap, hence the huge time dilation). The produced executable is also much smaller. The downside is that the resultant executable does not always go faster. Reading some inlining papers suggests that the 'inline until too big' heuristic is not sensible. A % increase might be better. I'm trying the following heuristics, inline until too big (current one) inline all smaller than X inline until too expanded inline all smaller than X% of target fn Note that my algorithm does a bottom up inlining, so we don't get problems with unbounded inlining of small functions. I don't delay inlining until the end of the compilation unit. Doing that would not be difficult, and then one could generate the complete call graph and potentially do a better job (it would not invalidate the work I'm doing, which is good). I'd guess I'll have something postable by the end of the week. Dan, if you can wait 'til then, that'd be great! nathan -- Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC 'But that's a lie.' - 'Yes it is. What's your point?' nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org