This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Challenges in Implementing OpenMP


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]