This is the mail archive of the gcc-patches@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: [PATCH] New pragma handling mechanism.


On Wed, Apr 13, 2005 at 12:49:32PM -0700, Mark Mitchell wrote:
> How do you plan to represent a statement-level #pragma in a C++ 
> template?

The OMP pragmas will have to have some representation in the
front-end intermediate language.  The actual pragma is largely
unaffected by templates; the only exception being references
to variables that will have to be remapped.

> It would be nice if the mechanism we have is general (rather 
> than, say, setting PRAGMA_OMP_FOO on the statement), so that we can 
> extend to other statement-level #pragmas in future.

How is "parsing" not general?  I don't like trying to design for
some unknown future requirements, which is what you're trying to
get me to do.

> And, when you instantiate the template, you want to be able to
> re-use routines called at parse-time.  How will that work?

There will be routines separate from the actual parsing routines
that will do the validation.  After we pass the OMP trees through
the instantiation routines, we can feed those trees to the validators.
I think this is a fairly well-explored pattern at this point...

The actual expansion of the OMP trees to gimple will be done by
generic code later on.  We have to share this bit with Fortran
and C after all.


r~


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