gomp-discuss
[Top][All Lists]
Advanced

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

Re: [Gomp-discuss] CIL representation ...


From: Biagio Lucini
Subject: Re: [Gomp-discuss] CIL representation ...
Date: Wed, 12 Mar 2003 13:48:50 +0000 (GMT)

On Wed, 12 Mar 2003, [iso-8859-1] Pop S?bastian wrote:

> 12.6.7 defines volatile reads and writes that is exacltly what we have
> to deal with when OpenMP says shared variables: in other words variables
> visible across all threads.

I think (tell me if I am wrong) that for a shared memory system (I believe
that we can't be "general" to the extend of tackling all the concurrent
model in one go) the general building blocks are
a) shared variables
b) private variables
c) locks
d) synchronisation

This, together with fork/joim mechanism, is all what a thread has to know
about. And once you speak in these terms, you should be able to tackle any
SM/NUMA-based parallel paradigm, be it OpenMP, Posix Threads, whatever.
As a subcase, you should be able to build any OpenMP functionality with a
combination of those. I don't know if this is a minimal subset (you may
argue that you can deal with shared variables in terms of locks, for
instance), but it should be a good compromise between exhaustivity and
complexity of implementation. Posix has already those built in and there
is a Posix Thread Librart available for Linux, so my suggestion goes along
the line of "posixising" OpenMP or whatever SM scheme. The suggestion is
as follows:
1) in the frontend phase, we collect and organise those information
2) in the Generic - Gimple phase we build threads as structure whose
component are the information collected in (1) and the code that the
thread must execute
3) optimising -> Not yet a clue for it :-)

At the moment we miss all the code for doing anything. Some time ago, I
was proposing to simulate (1) and (2) with some script (Perl, Python,
Ruby, whatever the interested people are more familiar with). I think that
just trying to implement a design you realise what is wrong with it, so I
bring forward again that proposal.

> Furthermore it defines the behaviour of an
> optimizing compiler with respect to transformations on CIL.
>

This could be a starting point for (3), though at a first reading
yesterday evening (may be I was slippy?) I could not find anything interesting

Questions: how does the actual optimising phase of gcc deals with Posix
Threads (if it does it at all)?

Biagio





reply via email to

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