This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: GCC loop iterations and wrapping


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.

I don't think chrecs are used that much in such a way.  In this
particular case, the problem is to reorganize the scev wrapping and
conversion in a more suitable fashion; I have a patch for this in
testing.

Zdenek


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