gomp-discuss
[Top][All Lists]
Advanced

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

Re: [Gomp-discuss] The directives...


From: Pop Sébastian
Subject: Re: [Gomp-discuss] The directives...
Date: Sun, 22 Dec 2002 11:21:25 +0100
User-agent: Mutt/1.3.28i

On Thu, Dec 19, 2002 at 12:13:41PM +0000, Biagio Lucini wrote:
> As for the structure of the chain, what about 
> 
> C/FORTRAN openmp source -> translation to C/FORTRAN + threads -> simplify
> -> etc.
> 
Yes that is the right approach.

I see 2 possible ways to attack this problem: 
- the first one is to translate all the directives into calls to libpthread
- the second one is to translate directives into an intermediate representation 
(IR)

Here again we go into the same problems as for DO_loops: 
if we choose the second solution we miss an opportunity to 
optimize programs that are written directly using libpthread.

If we choose the first approach (C with omp pragmas -> C with libpthread calls)
then if we want to optimize something we'll need an analyzer that transforms
libpthread calls into a more expressive representation (for example a promotion 
of call_expr nodes into nodes with parallel semantics: as synchronize_expr from 
java ASTs, mutexes, ...).  Then based on this AST an analyzer pass could 
construct 
the parallel flow graph, and from here Diego is the expert we'll need :-)

Thus I'm for the first solution: source to source transformations on GENERIC 
trees.

> 
> To me it sounds better than simplifying directly the openmp code: the
> threaded code is plain C/Fortran, so we won't need to attach nodes to the
> simplify tree. The only thing we need to do is to decide at some point of
> the chain simplify/glimpify whether to accept the proposed directives or
> not. The other advantage will be that the openmp project will be
> independent from other projects, which is in my view a big advantage in
> this preliminary stage.
> 
> Of course, I can be missing something, so please let me know what you 
> think.
> 
For me, your analysis is fine.

Thank you for having introduced some kinetic energy into this project :-)
Sebastian.



reply via email to

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