Re: Compiler support for multicore architectures

Ian Lance Taylor <ian@airs.com>
Tue, 18 Nov 2008 21:41:40 -0800

          From comp.compilers

Related articles
Compiler support for multicore architectures gauravgautam123@gmail.com (gaurav) (2008-11-18)
Re: Compiler support for multicore architectures kamalpr@hp.com (kamal) (2008-11-18)
Re: Compiler support for multicore architectures ian@airs.com (Ian Lance Taylor) (2008-11-18)
Re: Compiler support for multicore architectures m.helvensteijn@gmail.com (2008-11-19)
Re: Compiler support for multicore architectures walter@bytecraft.com (Walter Banks) (2008-11-19)
Re: Compiler support for multicore architectures toby@telegraphics.com.au (toby) (2008-11-20)
Re: Compiler support for multicore architectures jatin.bhateja@gmail.com (Jatin Bhateja) (2008-11-21)
Re: Compiler support for multicore architectures kamalpr@hp.com (kamal) (2008-11-23)
Re: Compiler support for multicore architectures idbaxter@semdesigns.com (Ira Baxter) (2008-11-28)
[2 later articles]
| List of all articles for this month |
From: Ian Lance Taylor <ian@airs.com>
Newsgroups: comp.compilers
Date: Tue, 18 Nov 2008 21:41:40 -0800
Organization: Compilers Central
References: 08-11-086
Keywords: parallel
Posted-Date: 19 Nov 2008 19:52:35 EST

gaurav <gauravgautam123@gmail.com> writes:


> What different things can a compiler do to make mutithreaded programs
> run better on multicore? Isnt it much depends on the threading
> library , OS and the programmar instead on compiler ?


In general, yes, it is. However, it's worth noting that one key
element of modern multithreaded programming does require compiler
support: Thread Local Storage. This permits C/C++ programmers to
write, e.g.,
        __thread int x;
to declare a thread local variable. The compiler has to generate the
right code sequences to access this variable, including support for
different TLS models.


The compiler must also provide access to basic synchronization
mechanisms, such as the __sync_ intrinsic functions originally defined
by Intel.


Ian



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.