tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: inline (Was: Bloat)



On Sun, 8 Feb 2009, David Laight wrote:

On Sat, Feb 07, 2009 at 08:17:23PM +0000, David Brownlee wrote:

        Would there be any sense in letting gcc pick when to inline?
        Gcc has -finline-functions -finline-limit=N which will
        inline any function less than N pseudo instructions. Picking
        a small enough value of N should automatically inline all
        trivial accessors, and any other function small enough to
        benefit. (The default is 600 which is probably too high
        for the kernel).

I've wanted it to inline all function that are smaller than 'n'
AFTER being inlined!

        That would be better, but would the current gcc functionality
        be 'good enough'?

Someone managed to write some a function that does sub-byte level
data access (tortuous). However all the callers supply constants
for the bit-offset and length - so the inlined version should
be trivial - except I had to do -O3 and increase -finline-limit
significantly to get them inlined at all.

        Given you've been playing with it - do you know if there is
        any way around the issue Thor commented on - functions not
        being inlined when called from other compilation units?

        Thanks :)

--
                David/absolute       -- www.NetBSD.org: No hype required --


Home | Main Index | Thread Index | Old Index