This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Faster compilation speed
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- To: Mike Stump <mrs at apple dot com>
- Cc: Phil Edwards <phil at jaj dot com>, Stan Shebs <shebs at apple dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 13 Aug 2002 14:27:45 +0200
- Subject: Re: Faster compilation speed
OK, since this is a brainstorming about speeding up gcc, and since
silly ideas are at least discussed, let me try one.
Why not make incremental compilation a standard for gcc...
This would mean storing some information into the object files.
Things I can see are:
- Compilation flags (defines, optimization, code generation
and debugging flags at least).
- A signature (eg MD5 or other) for each data_type/function/global (decl ?)
allowing for a quick check for a change. We may even differentiate
between visible/invisible changes. Eg if a function body changes
but not its interface there is no need to recompile the functions
calling it. More generally name changes could be detected as
non-changes, but I suspect that this will mess up with debugging information.
Then generate code only for the relevant symbols (ie the new ones or
those that have been changed or affected indirectly by a change ie
depending on a function or variable that changed) and do a replacing
of these in the .o file (is there an gas option like --replace ?).
In some way this is like PCH but pushed one step further. I can
understand that making it work reliably is quite difficult, but the
perspective of having a fast incremental compiler is tempting...
The information to store is certainly one of the trickiest part so a
first step could be to add a flag stating recompile only this symbol and
what depends on it. Not very user friendly, but maybe an interesting
first step...
Is this a totally remote/stupid idea, or can it be done in some
eventually not too distant future ??
Theo.
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------