[gomp] Challenges in Implementing OpenMP

Giovanni Bajo giovannibajo@libero.it
Thu Oct 14 06:55:00 GMT 2004


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




More information about the Gcc mailing list