This is the mail archive of the 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] parse OpenMP directives

On Wed, 13 Oct 2004, Sebastian Pop wrote:

> > The approach in this patch seems reasonable in principle, but the patch 
> > doesn't include any of the hard parts, such as the directives involving 
> > expressions, and those that have effects on the handling of a subsequent 
> > statement and restrict its form.  I don't think at present you'll easily 
> > get a single directive parser working for both C and C++, though you may 
> > be able to unify handling after parsing.
> > 
> For this I think that the solution is to generate a tree node per
> pragma, then handle the code generation issues after the parser,
> probably on GENERIC or even on GIMPLE level.  The far goal is to use a
> part of this information to direct our loop nest optimizers.

Indeed, I strongly recommend doing something that works to get OpenMP 
implemented - even if it does involve duplicate parsing implementations or 
other duplication or designs that might not be ideal were you writing a 
whole compiler collection from scratch - and avoiding false dependencies 
on large changes to or replacements of other parts of the compiler.  This 
or that large change might be of benefit to OpenMP - but unless truly 
required it can be considered separately on its own merits with 
convenience to OpenMP implementation being only one.  And where 
significant changes elsewhere in the compiler are necessary or desirable 
for OpenMP they can be designed carefully: determine and discuss the 
requirements and benefits of such a change; determine the minimal pieces 
of such a change that need to be made as a whole; write tests that will 
assess whether the requirements of such a piece of the change are met; 
design and document the change; implement and test it.

Joseph S. Myers      (personal mail) (CodeSourcery mail) (Bugzilla assignments and CCs)

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