This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] patch for pr 21130 - 38822 lines of Fortran 90 takes more than 10 minutes to compile on a dual 3GHz P4 Linux box with lots of RAM
- From: Bud Davis <bdavis9659 at sbcglobal dot net>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 29 Mar 2006 04:04:45 -0800 (PST)
- Subject: Re: [gfortran] patch for pr 21130 - 38822 lines of Fortran 90 takes more than 10 minutes to compile on a dual 3GHz P4 Linux box with lots of RAM
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=QZl+qqaFaCUwEzcXv1WDIlWXW2bq7nwMxeZPOCpYQD72JD/Ibx7susy/BCFeaUG0iwxekKbx0+oAwXdqRPzs4b4KKowlTDBk3Rchogb+YUK3jru9UH92U8fluJQfdUjSfo9yjHddgjIEQaZd4alvNc93H4O9iLs5STXwkzeRhr0= ;
paul,
excellent. i attempted to do exactly what you did,
but was a little flumoxed by the recursive nature of
the beast....thus my use of the additional 'count'
variable.
let me spend a day or two looking at it, then i will
submit a revised patch.
--bud
--- Paul Thomas <paulthomas2@wanadoo.fr> wrote:
> Bud,
>
> Upon further reflection, the attached patch, which
> is a simplified
> version of yours, achieves the same result. There
> is no need to count
> the remaining symbols but the premature returns
> should be stopped.
> Thus, taking an or of the result does the business.
>
> Regards
>
> Paul
> > Index: gcc/fortran/module.c
>
===================================================================
> *** gcc/fortran/module.c (revision 112441)
> --- gcc/fortran/module.c (working copy)
> *************** load_needed (pointer_info * p)
> *** 3061,3076 ****
> gfc_namespace *ns;
> pointer_info *q;
> gfc_symbol *sym;
>
> if (p == NULL)
> ! return 0;
> ! if (load_needed (p->left))
> ! return 1;
> ! if (load_needed (p->right))
> ! return 1;
>
> if (p->type != P_SYMBOL || p->u.rsym.state !=
> NEEDED)
> ! return 0;
>
> p->u.rsym.state = USED;
>
> --- 3061,3077 ----
> gfc_namespace *ns;
> pointer_info *q;
> gfc_symbol *sym;
> + int rv;
>
> + rv = 0;
> if (p == NULL)
> ! return rv;
> !
> ! rv |= load_needed (p->left);
> ! rv |= load_needed (p->right);
>
> if (p->type != P_SYMBOL || p->u.rsym.state !=
> NEEDED)
> ! return rv;
>
> p->u.rsym.state = USED;
>
>