This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] remove build_call_list from Fortran FE
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 1 Jul 2010 17:04:50 +0200
- Subject: Re: [PATCH] remove build_call_list from Fortran FE
- References: <20100701145033.GA17877@codesourcery.com>
On Thu, Jul 1, 2010 at 4:50 PM, Nathan Froyd <email@example.com> wrote:
> The patch below removes build_call_list from the Fortran FE by making
> gfc_conv_procedure_call use build_call_vec. ?It's not quite as clean as
> one might like, mostly because appending vectors is not nearly so nice
> as appending lists. ?The patch does have the nice benefit of removing
> quadratic behavior from gfc_conv_procedure_call, so gfortran should get
> slightly faster.
> This patch removes the last use of build_call_list in GCC. ?If approved,
> I will commit the build_call_list removal followup patch as obvious.
> Tested on x86_64-unknown-linux-gnu. ?OK to commit?
> +/* Copy the elements in SRC to DST, starting at INDEX in DST. ?Return
> + ? the next spot at which elements are to be added. ?DST is assumed to
> + ? have sufficient space available to hold SRC's elements. ?*/
> +static int
> +append_vec (VEC(tree,gc) *dst, VEC(tree,gc) *src, int index)
> + ?int len = VEC_length (tree, src);
> + ?memcpy (VEC_address (tree, dst) + index, VEC_address (tree, src),
> + ? ? ? ? len * sizeof (tree));
> + ?return index + len;
Finally a reason to add VEC_splice?