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: [patch] for PR28411


Hello,

> On Sat, 29 Jul 2006, Zdenek Dvorak wrote:
> >
> > 	PR tree-optimization/28411
> > 	* tree-ssa-loop-niter.c (derive_constant_upper_bound): Pass NULL for
> > 	the remainder argument of double_int_udiv.
> > 	* double-int.c (double_int_div, double_int_udiv, double_int_sdiv):
> > 	Return also remainder after division.
> > 	* double-int.h (double_int_div, double_int_udiv, double_int_sdiv):
> > 	Declaration changed.
> > 	* tree-ssa-loop-ivopts.c (constant_multiple_of): Returns the result
> > 	in double_int.
> > 	(get_computation_aff, get_computation_cost_at): Handle double_int
> > 	return type of constant_multiple_of.
> 
> I'd prefer that you add a new double_int_divmod if you need one, rather
> than change the div, udiv and sdiv APIs.  It makes sense to define/keep
> stable APIs that allow efficient calculation of quotients and remainders
> without the need to calculate both.

is it possible to calculate quotient without calculating remainder at
the same time?

Zdenek

> void double_int_sdivmod (double_int a, double_int b, unsigned int code,
> 			 double_int *div, double_int *mod);
> 
> 
> Thanks in advance,
> 
> Roger
> --


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