This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC loop iterations and wrapping
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>, David Edelsohn <dje at watson dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Oct 2005 15:27:25 -0400
- Subject: Re: GCC loop iterations and wrapping
- References: <200510162112.j9GLC2q31874@makai.watson.ibm.com> <20051017111611.GB3403@napoca.cri.ensmp.fr> <200510171439.j9HEdRq29556@makai.watson.ibm.com> <20051017161246.GA5937@napoca.cri.ensmp.fr> <200510171705.j9HH53q28188@makai.watson.ibm.com> <20051017182521.GA929@napoca.cri.ensmp.fr> <200510171833.j9HIXvq39648@makai.watson.ibm.com> <20051017185146.GA19710@napoca.cri.ensmp.fr> <200510181925.j9IJPtq27920@makai.watson.ibm.com> <20051021172109.GA31610@napoca.cri.ensmp.fr> <20051021180623.GA13448@atrey.karlin.mff.cuni.cz>
On Fri, 2005-10-21 at 20:06 +0200, Zdenek Dvorak wrote:
> Hello,
>
> > - /* FIXME: convert_step should not be used outside chrec_convert: fix
> > - this by calling chrec_convert. */
> > - iv_step = convert_step (dta->ivopts_data->current_loop,
> > - sizetype, iv->base, iv->step, dta->stmt);
> > + chrec = build_polynomial_chrec (loop->num, iv->base, iv->step);
> > + chrec = chrec_convert (sizetype, chrec, dta->stmt);
>
> I don't like this change. You just waste memory creating a
> polynomial_chrec, without any reason.
Perhaps we should introduce a "constant_chrec_op" like we have for
binops to avoid allocating memory, that we know are just doing
operations that should generate constant results.
>
> Zdenek