This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Threading the compiler
- From: Ian Lance Taylor <iant at google dot com>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "'GCC Development'" <gcc at gcc dot gnu dot org>
- Date: 14 Nov 2006 10:30:15 -0800
- Subject: Re: Threading the compiler
- References: <011f01c70794$77129810$a501a8c0@CAM.ARTIMI.COM>
"Dave Korn" <dave.korn@artimi.com> writes:
> > The main place where threading may make sense, especially
> > with LTO, is the linker. This is a longer lived task, and
> > is the last step of compilation, where no other parellel
> > processes are active. Moreover, linking tends to be I/O
> > intensive, so a number of threads will likely be blocked
> > for I/O.
>
> I'm not really sure how this would play with SMP (as opposed to threading).
> I don't see why you think threading could be particularly useful in the
> linker? It's the pipeline of compiler optimisation passes that looks like an
> obvious candidate for threading to me.
It's irrelevant to the main discussion here, but in fact there is a
fair amount of possible threading in the linker proper, quite apart
from LTO. The linker spends a lot of time reading large files, and
the I/O wait can be parallelized. And the linker spends a reasonable
amount of time computing relocations, which can be parallelized such
that the relocations for each input file are computed independently.
Ian