On 9/1/07, Gary Funck <[EMAIL PROTECTED]> wrote: > All suggestions/help appreciated, - Gary
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. See the implementation of the 'shared' clauses in omp-low.c. It will mostly depend on the threading semantics of UPC. In OpenMP, we operate on a pthread-like environment, so we can pass around pointers to the stack in the parent thread which can then be shared with the children threads. 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.