This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Parallelize the compilation using Threads
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Giuliano Augusto Faulin Belinassi <giuliano dot belinassi at usp dot br>
- Cc: nd <nd at arm dot com>, GCC Development <gcc at gcc dot gnu dot org>, "kernel-usp at googlegroups dot com" <kernel-usp at googlegroups dot com>, "gold at ime dot usp dot br" <gold at ime dot usp dot br>, "alfredo dot goldman at gmail dot com" <alfredo dot goldman at gmail dot com>
- Date: Thu, 15 Nov 2018 18:07:21 +0000
- Subject: Re: Parallelize the compilation using Threads
- References: <CAEFO=4A0DJVDYze7P5mCOzDjGpJC1Y180nP_UmXxwqduy87=bA@mail.gmail.com> <CAFiYyc1kogmJ_5suHg+7fDaNjrYZnGjNGq4dew5uvc+w6-_BKQ@mail.gmail.com>
On 15/11/18 10:29, Richard Biener wrote:
> In my view (I proposed the thing) the most interesting parts are
> getting GCCs global state documented and reduced. The parallelization
> itself is an interesting experiment but whether there will be any
> substantial improvement for builds that can already benefit from make
> parallelism remains a question.
in the common case (project with many small files, much more than
core count) i'd expect a regression:
if gcc itself tries to parallelize that introduces inter thread
synchronization and potential false sharing in gcc (e.g. malloc
locks) that does not exist with make parallelism (glibc can avoid
some atomic instructions when a process is single threaded).