This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Move most of *_double routines from fold-const.c to double-int.c
On 5/6/07, Brooks Moses <brooks.moses@codesourcery.com> wrote:
A couple of comments:
Richard Guenther wrote:
> This patch is the first one in a (hopefully, to be completed) series
> to consolidate computation routines on out double-int representation.
> It simply moves low-level routines to double-int.c where other low-level
> routines reside.
It seems rather of confusing to me that you're leaving the prototypes
for these functions in tree.h rather than moving them to double-int.h
where all the prototypes for double-int.c currently reside. (Especially
since, with my recent patch, tree.h directly includes double-int.h, so
the result is the same for the compiler either way.)
Ah, I didn't notice that tree.h now includes double-int.h. That will
make moving
the prototypes a no-brainer.
> So, the immediate plan is to provide two lowlevel set of routines. First
> what we basically have with the double_int routines, operating on the
> full width and not handling overflow in any way. Second a set that
> operates with specified signedness and precision and tracks overflow
> with direction (-1 for overflow towards -INF, +1 for +INF, zero for no
> overflow). I also plan to change most of the interfaces to pass
> double_ints instead of the split HOST_WIDE_INTs.
I wonder if some of the overflow handling that you're including for this
could be used to clean up a bit of the overflow handling in the
mpz-to-double-int conversion functions that I recently put in there.
It's kind of messy as it stands now.
I didn't look at those routines yet, but I'll do so and make sure we
can clean them
up a little with the new routines.
Richard.
- Brooks