gomp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gomp-discuss] Code generation


From: Steven Bosscher
Subject: Re: [Gomp-discuss] Code generation
Date: 24 Feb 2003 17:26:26 +0100

Op ma 24-02-2003, om 16:36 schreef Biagio Lucini:
> I was thinking over the week end on how to perform a source-to-source
> transformation from OpenMP to pthreads. I suppose that if I break this
> problem into pieces, many of them would be reusable when the middle end
> will analyze the OpenMP stuff. Now my problem concerns the type of the
> variables. Consider for instance

I think it is a good idea to start thinking about the code
transformations we need.  First of all because we'll have to start doing
them at some point in the compiler, but also because it would give us an
idea of the extension we need to the GENERIC/GIMPLE intermediate
representations (that is, the new tree codes).

(Basically this would mean interpreting the semantics of the
specification, and maybe develop algorithms for the code transformations
in pseudo-code???)

I think actually doing source-to-source transformations is not a good
idea.

> #pragma openmp parallel shared(list1) private(list2)
> 
> At this point, list1 and list2 are characters. What I mean is that their
> type could have been defined elsewhere, even on another source file.
> Moreover, there might be also variables with the same name that have
> nothing to do with the ones i am interested in (e.g. they have another
> scope and omonomy is only an accident). It is not difficult to produce an
> example that could mislead any source-to-source translation.

IMHO, this is exactly the reason why the compiler can do a better job
than a preprocessor.  In the compiler you know everything about the
symbols in the source file.  A preprocessor would have to parse all
declarations to know the same, and it it can do that point the
preprocessor is already almost a source-to-source *compiler*, not really
a preprocessor.

Greetz
Steven






reply via email to

[Prev in Thread] Current Thread [Next in Thread]