Missing qualifications
Paolo Carlini
pcarlini@suse.de
Thu Mar 10 15:15:00 GMT 2005
Chris Jefferson wrote:
> While this is adding a very small regression, it's already a problem. We
> tend to have lots of code like:
>
> void library_function(...)
> { internal_function(...); }
>
> At the moment what happens is the very tiny library_function gets
> inlined into the user's code, so the user is "effectively" calling
> internal_function. However often it will have an extra dummy parameter
> or two. We need to either:
>
> a) stop any (or as little as possible) code being generated for dummy
> parameters or
>
> b) force internal_function to be inlined into library_function, and have
> user code just call library_function (or inline the whole lot)
>
> I think (b) might be more sensible (the reason we can't just trust the
> default inlining is we know that these quite large functions are only
> used in one place), except I have no idea how it would intermingle with
> the inlining heuristic.
This is actually another issue, which probably should be investigated by
itself. Probably you are aware of the fact that *a lot* of work is going
on in this area, both short-term and long-term. We should definitely get
in touch with the right people and present detailed problems. Is your
proposal b) akin to Richard Guenther "leafify" proposal? In that case,
probably it's a well known issue and we have only to wait a bit.
Otherwise, are you willing to file a PR about it? Probably it's the
first thing to do.
Paolo.
More information about the Libstdc++
mailing list