[1/4] [patch, middle-end] Make mpz_set/get_double_int functions non-static.

Brooks Moses brooks.moses@codesourcery.com
Thu Apr 19 20:45:00 GMT 2007


:ADDPATCH middle-end:

At 04:40 PM 4/13/2007, Zdenek Dvorak wrote:
> > At 02:11 PM 4/9/2007, Daniel Berlin wrote:
> > >Remember that POINTER_TYPE is not the only pointer type :(
> >
> > Right, thanks.  Using POINTER_TYPE_P will get them all, I take it?
>
>yes, it should (at least, this is what we do on other places
>where we use TYPE_MIN_VALUE on scalars).

So, here's the updated version of this patch, which incorporates all the 
previous comments by Zdenek and Daniel.

The intent of this patch is to consolidate the GMP-to-double-int conversion 
functions between the middle-end and the Fortran front end.  (The Fortran 
portions of this were posted separately, as "4/4" in this series.)  The new 
"wrap" option in mpz_get_double_int is copied from the Fortran version of 
this code.

---------------------------------------------------------------------
2007-04-06  Brooks Moses  <brooks.moses@codesourcery.com>

         * double-int.c (mpz_set_double_int): Moved from
         tree-ssa-loop-niter.c.
         (mpz_get_double_int): Likewise; also, add option to wrap
         out-of-range integers.
         * double-int.h: New prototypes for above.
         * tree.c (get_static_type_bounds): Moved from
         tree-ssa-loop-niter.c; now returns TYPE_MIN_VALUE and
         TYPE_MAX_VALUE if they exist..
         * tree.h: New prototype for above.
         * tree-ssa-loop-niter.c: Adjust mpz_to_double_int and
         get_type_bounds calls.
         (mpz_set_double_int): Move to double-int.c.
         (get_type_bounds): Move to tree.c, rename to
         get_static_type_bounds.
         (mpz_to_double_int): Move to double-int.c, rename to
         mpz_get_double_int.

---------------------------------------------------------------------

Again, bootstrapped and regression-tested on i686-pc-linux-gnu with "make 
check-gcc".  Ok for trunk?

- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: double_int_to_mpz_5.diff
Type: application/octet-stream
Size: 8610 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070419/8c916692/attachment.obj>


More information about the Gcc-patches mailing list