This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Final intermodule patch


Geoff Keating wrote:
Date: Mon, 14 Jul 2003 11:07:51 +0100
From: Nathan Sidwell <nathan@codesourcery.com>

Right.  My patch does not implement any optimisations, and it is not a
change to the optimizers.  You do not get better code generation just
because you use it; you must use -Osomething too.
ok, your patch is not an optimization, but it is a major change to the
internal process of the compiler and I object to it being triggered
by the subtle mechanism of setting the name of the output file when there
is more than one source file and you are not going all the way to a final
executable. I'm finding it difficult (i.e. not one springs to mind,
but I'm sure someone will enlighten me) to think of another tool that
changes its processing in a similar way.

You took a previously ill-formed combination of command line options
and gave them one of many possible meanings. That is not good orthogonal
design.

-no. The latter does intermodule stuff but the former does not. 'at
once' is being used with two different meanings in the one sentance![1]
You'll notice we've now made the options non-compoundable. Unless I
misgrepped I could find nothing in the invoke.texi file about the
advantages or disadvantages of 'compiling at once'

[1] A pedant points out that the compiler will compile your source 'at once'
even if you do not specify the name of an output file -- it doesn't sit
there humming to itself for a few minutes before starting the work!


It does wait to compile the *second* file.  That's why I said "all
your source".
You misundestand the point I was trying to make (and I obfuscated with a
pun) Both you and I know that gcc spawns cc1, gas, & ld etc. Not all users
are so sophisticated. Thinking as a user, if I say
	gcc stuff
and then without any more input from me, it produces other stuff,
it has done all that at once in a single atomic operation. I don't know
if it waited to compile the second file. For all I know it forked itself,
and did them concurrently. Only when I peek behind the curtain with -v do
I discover otherwise.

to nathaniel you wrote,
> *sigh* I should never have mentioned the word 'intermodule'.  I should
> have just said "looky, here's a way to compile multiple files into a
> single .o!" and let people deduce for themselves what it's good for.
Then we'd say 'so? I can do that already with a partial link':)[1] Your
patch is doing more than that. It needs much more documentation. If
anything, having a -fintermodule option would give an obvious place in the
manual to point to!

nathan

[1]Hey, that might be another perfectly reasonable interpretation of
multiple .c files, single .o file command line.

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]