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


Giovanni Bajo wrote:
I would say this is better suited as a language independent pass, which would
allow us not to duplicate too much work and effort.

You're probably correct.


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.

Yes it does. The transformation can be rather extensive, and are language dependent to some extent. Even C and C++ differ in subtle ways, due to the nature of C++ objects.


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).

Yes; in fact, for some parallel architectures, OpenMP requires some rather extensive reorganization of the code, including the creation of new variables and functions.


..Scott

--
Scott Robert Ladd
site: http://www.coyotegulch.com
blog: http://chaoticcoyote.blogspot.com


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