This is the mail archive of the
mailing list for the GCC project.
Re: Parallelize the compilation using Threads
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>, Giuliano Belinassi <giuliano dot belinassi at usp dot br>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, kernel-usp at googlegroups dot com, gold at ime dot usp dot br, Alfredo Goldman <alfredo dot goldman at gmail dot com>
- Date: Sat, 16 Feb 2019 13:35:41 +0900
- Subject: Re: Parallelize the compilation using Threads
- References: <CAEFO=4A0DJVDYze7P5mCOzDjGpJC1Y180nP_UmXxwqduy87=bA@mail.gmail.com> <CAFiYyc1kogmJ_5suHg+7fDaNjrYZnGjNGq4dew5uvc+w6-_BKQ@mail.gmail.com> <CAEFO=4D2GU_KNG8Z-JH_4R7tFeU1Mm+u627HpWQJYmr5O+Ym7Q@mail.gmail.com> <CAFiYyc0HMDtPLJKkkYhFULBbGt8n-41fWaMtqLNmUOu9gird7w@mail.gmail.com> <email@example.com> <CAFiYyc3Gt9khFX+J5wBKs6h3D3e=1CT343SL9sy_GUpvqboDyQ@mail.gmail.com>
On Tue, 2019-02-12 at 15:12 +0100, Richard Biener wrote:
> On Mon, Feb 11, 2019 at 10:46 PM Giuliano Belinassi
> <firstname.lastname@example.org> wrote:
> > Hi,
> > I was just wondering what API should I use to spawn threads and
> > control
> > its flow. Should I use OpenMP, pthreads, or something else?
> > My point what if we break compatibility with something. If we use
> > OpenMP, I'm afraid that we will break compatibility with compilers
> > not
> > supporting it. On the other hand, If we use pthread, we will break
> > compatibility with non-POSIX systems (Windows).
> I'm not sure we have a thread abstraction for the host - we do have
> one for the target via libgcc gthr.h though. For prototyping I'd
> to this same interface and fixup the host != target case as needed.
Or maybe, in the year 2019, we could assume that most c++ compilers
which are used to compile GCC support c++11 and come with an adequate
<thread> implementation... yeah, I know, sounds jacked :)