This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [FORTRAN PATCH] Use memcpy for array constructor assignments


On Wed, Jan 17, 2007 at 02:13:52PM -0700, Roger Sayle wrote:
> 
> 2007-01-17  Roger Sayle  <roger@eyesopen.com>
> 
>         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
>         i.e. that the ARRAY_REF doesn't mention components.
>         * trans-array.c (gfc_constant_array_constructor_p): Export external
>         function renamed from constant_array_constructor_p.
>         (gfc_build_constant_array_constructor): Export.
>         (gfc_trans_array_constructor): Update call to the renamed function
>         constant_array_constructor_p.
>         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
>         (gfc_build_constant_array_constructor): Likewise.
>         * trans-expr.c (gfc_build_memcpy_call): New helper function split
>         out from gfc_trans_array_copy.
>         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
>         (gfc_trans_array_constructor_copy): New function to optimize
>         assigning an entire array from a constant array constructor.
>         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
>         when appropriate.
> 
>         * gfortran.dg/array_memcpy_3.f90: New test case.
>         * gfortran.dg/vect/vect-5.f90: Update vectorized loop count.
> 

OK.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]