11 msgDoes g++ have a intel/msdn __COUNTER__ macro eq...
1 msggcc-4.1-20070903 is now available
1 msgAbout allocating registers for instrumentation
1 msghas_volatile_ops and early optimization w/o ali...
1 msgA script to create templates for a new port

(gcc 4.2) how to create an ADDR_EXPR that refer...
\ Gary Funck (1 Sep 2007)
. \ Diego Novillo (1 Sep 2007)
. . \ Gary Funck (1 Sep 2007)

3 msgGCC Plugin Branch
1 msgBuild failure on Darwin, revision 127998 (solved)
19 msgRFC: Hack to make restrict more useful
1 msggcc-4.3-20070831 is now available
7 msgDFA Scheduler - unable to pipeline loads
2 msgbuilding libgcc
1 msgBuild failure on Darwin, revision 127998
2 msgError in c-lex.c
3 msgComment mismatch in tree-cfg.c:verify_gimple_expr
2 msgWrong lib address
3 msgWhat are '1B' variables ?
3 msgStage 2 project: new interference graph represe...
6 msgWhy is LIMITS_H_TEST defined in cris/t-linux? I...
2 msgKrister Walfridsson appointed NetBSD OS port ma...
Subject:Re: (gcc 4.2) how to create an ADDR_EXPR that refers to a linkage name?
Group:Gcc
From:Gary Funck
Date:1 Sep 2007


On Sat, Sep 01, 2007 at 01:43:37PM -0400, Diego Novillo wrote:
>
> Have you considered using the data sharing machinery in OpenMP? We
> simply create a data structure holding all shared variables, allocate
> that in shared memory and re-write all references to shared variables
> as dereferences to that structure.

Diego, thanks. Some other implmentations of UPC reference
all shared variables indirectly through a table, built
at runtime. The compiler tells the runtime how much space
each variable reauires, and the runtime alloctes this from
the shared memory region.

The current strategy used by GCC/UPC is somewhat simpler;
it lets the linker create the layout of the shared
variable section. Perhaps we need to re-visit this design
decision, and adopt a scheme similar to that used by GOMP.
I'll review omp-low.c for ideas.

GCC/UPC does have a pthreads mode of operation, but that is
a special case. UPC threads are usually mapped to separate
processes. The shared memory region is potentially
distributed across network nodes, often accessed via a
high speed interconnect. The runtime that is part of the
GCC/UPC's release supports only SMP configurations and
relies on mmap(). However, GCC/UPC also works with a more
general runtime developed by Berkeley, which supports many
network interconnects.

>
> This trick you are implementing with cloning the VAR_DECLs is
> guaranteed not to work, sorry. We very explicitly assume that if
> DECL_UID (x1) == DECL_UID (x2) then x1 == x2. This is not something
> that will change.

Yeah, I suspected as much when I first wrote that code.
I wasn't too surprised to see that it failed a consistency
check in GCC 4.2.


© 2004-2008 readlist.com