This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Challenges in Implementing OpenMP
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Scott Robert Ladd" <coyote at coyotegulch dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 14 Oct 2004 03:42:41 +0200
- Subject: Re: [gomp] Challenges in Implementing OpenMP
- References: <416D5F62.1040508@coyotegulch.com>
Scott Robert Ladd wrote:
> My feeling is that OpenMP processing should take place in the language
> parser. Given the differences in the parsers for C and C++, this looks
> to require separate modifications to those compilers. The
> implementation for Fortran will, of course, be based on gfortran.
I would say this is better suited as a language independent pass, which would
allow us not to duplicate too much work and effort.
Of course, I am not sure about implications. I read some documentation on
OpenMP, and it seems that the pragmas affect/transform code blocks to make them
parallel. Now, if the C/C++/gfortran FEs produce some new GENERIC trees like
OPENMP_PARALLEL_EXPR which wraps the statements affected by the pragmas, we can
do the code transformation in a language independent fashion, probably even
within gimplification (or immediatly before/after it). It has to be done before
any kind of optimization of course (for many reasons, for instance the #pragmas
do sometimes mention source variable names).
Am I missing something?
Giovanni Bajo