[patch] Improvements to work with affine combinations (updated and split)

Andrew Pinski pinskia@physics.uc.edu
Fri Jan 13 01:07:00 GMT 2006


On Jan 12, 2006, at 7:37 PM, Zdenek Dvorak wrote:

> Hello,
>
> this patch is a part of (a bit messy)
>
> http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02097.html
>
> For easier review, this patch just makes the function for
> work with affine combination handle wider than HOST_WIDE_INT
> coefficients, and moves the functions to a separate file.
> The related cleanups to ivopts are deferred to a followup
> patch.
>
>

> + /* Returns A * B, truncated so that it fits MASK.  */
> +
> + double_int
> + double_int_mul (double_int mask, double_int a, double_int b)
> + {
> +   unsigned HOST_WIDE_INT lo;
> +   HOST_WIDE_INT hi;
> +   double_int ret;
> +
> +   mul_double (a.low, a.high, b.low, b.high, &lo, &hi);
> +   ret.low = lo;
> +   ret.high = hi;
> +
> +   return restrict_cst_to_precision (mask, ret);
> + }

I don't understand why you have these functions in tree-affine.c at 
all, shouldn't
they really go into their own file?

Also didn't Daniel Berlin said we should go either full SCEV or full 
affine?

-- Pinski



More information about the Gcc-patches mailing list