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] Move most of *_double routines from fold-const.c to double-int.c


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.)


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.


- Brooks


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