This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: If you had a month to improve gcc build parallelization, where would you begin?
- From: Geert Bosch <bosch at adacore dot com>
- To: Simon Baldwin <simonb at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 3 Apr 2013 17:16:13 -0400
- Subject: Re: If you had a month to improve gcc build parallelization, where would you begin?
- References: <CAPTY64o0UBQBwnq_GMNOBRmdBV4QTc+En3Q7pLn6iR1aKXKQTA at mail dot gmail dot com>
On Apr 3, 2013, at 11:27, Simon Baldwin <simonb@google.com> wrote:
> Suppose you had a month in which to reorganise gcc so that it builds
> its 3-stage bootstrap and runtime libraries in some massively parallel
> fashion, without hardware or resource constraints(*). How might you
> approach this?
One of the main problems in large build machines is that a few steps
in the compilation take a very long time, such as compiling
insn-recog.o (1m30) and insn-attrtab.o (2m05). This is on our largish
48-core AMD machine. Also genattrtab and genautomata are part of
the critical path, IIRC. These compilations, which are repeated
during the bootstrap, take a significant part of the total sequential
bootstrap time of about 20 min real, 100 min user and 10 min sys
on this particular machine.
I think the easiest way in general to achieve more parallelization
during the bootstrap is to speculatively reuse the old result (.o
file or other output) and in parallel verify that, yes, eventually
we produce the same result. This has to be done carefully, so that
we don't accidentally skip the verification, negating the self-testing
purpose of the bootstrap.
-Geert