[patch, Fortran] Fix PR 50690
Thomas Koenig
tkoenig@netcologne.de
Tue Oct 25 05:40:00 GMT 2011
Ping ** 0.571428
> Jakub Jelinek wrote:
>> Though, what could be done is just special case OpenMP workshare regions,
>> insert everything into BLOCK local vars unless in OpenMP workshare, in
>> that
>> case put the BLOCK with the temporary around the workshare rather than
>> inside of it. In the case of omp parallel workshare it would need
>> to go in between omp parallel and omp workshare.
>
> Well, here's a patch which implements this concept. I chose to insert
> the BLOCK in a separate pass because it was the cleanest way to avoid
> infinite recursion when inserting a block.
>
> Regression-tested. OK for trunk?
>
> Thomas
>
> 2011-10-21 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> PR fortran/50690
> * frontend-passes.c (workshare_level): New variable.
> (create_var): Put the newly created variable into the block
> around the WORKSHARE.
> (enclose_workshare): New callback function to enclose
> WORKSHAREs in blocks.
> (optimize_namespace): Use it.
> (gfc_code_walker): Save/restore current namespace when
> following a BLOCK. Keep track of workshare level.
>
> 2011-10-21 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> PR fortran/50690
> * gfortran.dg/gomp/workshare2.f90: New test.
>
>
More information about the Fortran
mailing list