DragonFly BSD
DragonFly kernel List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: systimer01.patch available for review.

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 29 Jan 2004 18:47:35 +0100

On Thu, Jan 29, 2004 at 07:20:53PM +0200, Alex Keahan wrote:
> Actually, there's nothing fundamental to prevent the compiler from
> inlining a function if the source is not in the file being compiled.

Well, there is. At least with the way the compiler is currently invoced.
It can be done with a better compiler doing e.g. IPC analysis and the
like, but that's something GCC is very bad at ATM.

> In fact, Sun's Forte C compiler can optimise and inline functions across
> multiple source files.   With -xcrossfile, Sun CC analyses all the files
> named on the command line as if they were a single source file.
> Of course, this affects the way Makefiles are constructed, because
> the files produced from cross-compilation must be used as one unit when
> linking into a program.   In particular, if one function is changed, all
> the files must be recompiled (due to possible inlining
> interdependencies).

Even better optimizations are possible with explicit lists of public
symbols. This allows optimizations GCC 3.4 will do for static functions
not referenced via pointer.


> AK

P.S.: Does anyone else get line-wrapped mail headers e.g. for mail I
answered? In general I get this behaviour for most message which seems
to come via NNTP ;-) I'm not sure wether this is getmail/maildrop or the
the gateway.

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