[RFA] Limit stack usage growth caused by inliner

Jan Hubicka jh@suse.cz
Sun Nov 5 23:15:00 GMT 2006

> > On Sunday 05 November 2006 22:27, Jan Hubicka wrote:
> > > The patch simply estimate stack usage of non-gimple-registers variables by
> > > running the cfgexpand's variable packing code
> > 
> > Do we have to do this? That code is not linear, sounds like you
> > could introduce a bad compile time regression here.
> Well, we do it twice instead of once, so it should not be that bad.
> Other alternative would be to simply sum sizes of the locals (or do that
> for functions with number of locals exceeding some limit, as discussed
> on the other thread, but that probably can be done incrementally for
> both inlining and expansion time).

I tried the idea of summing sizes and on tramp3d it increases average
stack frame estimate for functions with non-zero stack usage 3 times, so
it is probably good idea to use the packing algorithm as for C++ there
seems to be something to pack...

> Honza
> > 
> > Gr.
> > Steven

More information about the Gcc-patches mailing list