This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [FORTRAN PATCH] Generalize constant array construction to multiple dimensions
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 18 Feb 2007 11:28:45 -0800
- Subject: Re: [FORTRAN PATCH] Generalize constant array construction to multiple dimensions
- References: <14226.68.35.10.103.1171254974.squirrel@mail.eyesopen.com>
On Sun, Feb 11, 2007 at 09:36:14PM -0700, Roger Sayle wrote:
>
> 2007-02-11 Roger Sayle <roger@eyesopen.com>
>
> * trans-array.c (gfc_build_constant_array_constructor): When the
> shape of the constructor is known, use that to construct the
> gfc_array_spec.
> (gfc_trans_constant_array_constructor): Initialize the "info"
> information for all of the dimensions of the array constructor.
> (constant_array_constructor_loop_size): New function.
> (gfc_trans_array_constructor): Use it to determine whether a
> loop is suitable for "constant array constructor" optimization.
>
> * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
> instead of build2, to avoid conditions like "(a != b) != 0".
>
> * gfortran.dg/array_constructor_15.f90: New test case.
>
It looks like this patch may have fallen into the review void.
OK for mainline and 4.2 if you have time to backport.
--
Steve