[gnu.gcc.bug] A smart linker proposal and fpp question

meulenbr@cstw01.UUCP (Frans Meulenbroeks) (01/02/89)

Happy New Year!

I don't know if this is the proper place to drop this, but I'm being
told that gnu.gcc is not a good place either and perhaps someone can do
something with this.

I've been impressed by the inline function capability of gcc.
However, since I have quite a lot small library functions the gain from
this is nil. I was wondering if it was possible to create a smart linker
which could do some global optimisation (like making small functions
inline, and perhaps other optimisations). 

I don't know if things like an optimising linker exist. 
anyway, I'd like to drop the following questions:
Is such a linker feasible, or am I dreaming?
Is there interest in such a tool and would it be worth the effort?
To what kind can one make use of the gcc optimisation code?

One small unrelated question:
Does someone have a free fpp library for the 68881, or do I have to
craft my own?

Thanks,
-- 
Frans Meulenbroeks        (meulenbr@cst.prl.philips.nl)
	Centre for Software Technology
	( or try: ...!mcvax!philmds!prle!cst!meulenbr)

rms@WHEATIES.AI.MIT.EDU (Richard Stallman) (01/03/89)

I have heard of systems with such linkers.  However, "linker" may be
a misnomer; it really involves writing some sort of intermediate code
into "object files", and finishing the compilation of the entire program
all at once at the end.

It might be possible to extend GCC this way, but it would be a lot of
work.  I don't know how much faster the output would run.  I don't plan
to work on this, so feel free.

dac@f.gp.cs.cmu.edu (Daniel Christian) (01/06/89)

Is it possible to create "libraries" of inline functions?  On the same
note, could you also precompile header files?

It seems like both of these would require the compiler to load in some
sort of RTL file at compile time.  It would then incorporate the code,
optimize, and produce perfectly normal object files.

I have been working with X11 server development.  Many of the server
files pull in 4000 lines of headers (with lots of machine dependent
conditionals) before they get to your code.  Precompiled headers would
be wonderful here.

It would also make lots of sense for math libraries and the like to be
pulled inline.  Currently, you would have to include all the sources
before the compiler could inline things.  If you had RTL math
libraries, the compiler could inline the "pre-compiled" functions
quickly.

Just a thought,
-Dan Christian
dac@ri.cmu.edu

--