This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] issue with openmp
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Patrick Marlier <patrick dot marlier at unine dot ch>, FELBER Pascal <pascal dot felber at unine dot ch>, Javier Arias <javier dot arias at bsc dot es>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Jun 2010 11:41:18 -0700
- Subject: Re: [trans-mem] issue with openmp
- References: <4C04C24A.4080103@unine.ch> <20100618152559.GA7343@redhat.com> <20100622181750.GA23011@redhat.com>
On 06/22/2010 11:17 AM, Aldy Hernandez wrote:
> On Fri, Jun 18, 2010 at 11:26:00AM -0400, Aldy Hernandez wrote:
>> The problem here is that gimplify_transaction() places the temporaries
>> that were generated for a transaction in cfun->local_decls, but
>> omp_copy_decl() will only look in the enclosing contexts, not in
>> cfun->local_decls.
>>
>> rth suggested we make a better attempt at putting temporaries into the
>> proper context so OMP can figure out how to pull pieces out to make a
>> new function.
>>
>> The patch below wraps the transaction bodies into a BIND_EXPR, which
>> gimplify_transaction() can later use for its temporaries, thus allowing
>> the OMP code to find a proper context.
>>
>> OK for branch?
>
> Meanwhile, back at the ranch... rth complains that we should do this in
> the gimplifier and save the front-end work.
>
> Yay, less code!
>
> OK for branch?
>
> * gimplify.c (gimplify_transaction): Wrap transaction body
> in a BIND_EXPR.
Ok.
r~