Complier options for multi core architecture systems
Brian Dessent
brian@dessent.net
Thu Sep 25 15:48:00 GMT 2008
pvssvikas wrote:
> Can any one please suggest me if there is/has been any work done on
> utilizing the multi core architecture with respect to gcc compiler.
>
> I'm looking for some support from the compilers to fine tune the code
> generation for an application which is being targeted to run on mutil-core
> hardware.
>
> It would be great if any of you could suggest some flags which can fine-tune
> the application for multi-core systems.
Parallelism is not a magic wand that you can just wave over code. It
requires careful study and design on the part of the programmer, in that
algorithms have to be chosen and implemented that can be split into
separate independent work units. gcc since 4.2 supports OpenMP which
does allow some loops to be automatically parallelized, but again this
requires specific programmer action to add markup to the code to direct
the compiler.
On the other hand, you don't need any special compiler support to write
multi-threaded programs, using whatever thread API your platform
supports (e.g. pthreads.)
Brian
More information about the Gcc-help
mailing list