Preprocessor arithmetic
Torbjorn Granlund
tege@swox.com
Wed Nov 15 13:55:00 GMT 2000
Joern Rennecke <amylaar@redhat.com> writes:
> Hm, g95 presently uses libgmp for integer and floating point
> arithmetic simulation. It might not be a bad idea to scrap what we
> have and use libgmp everywhere - particularly the floating point
> emulator.
I think that doing tree and rtl arithmetic (e.g. for fold-const.c, (g)cse.c
and combine.c) with gmp would slow the compiler down.
Yes, using GMP, at least it high-level functions is not a good idea.
It is better to implement a little special library for fixed
precision. After all, fixed precision is what the compiler really
needs.
Regarding using GMP's float functions instead of real.c, I'd vote
against that too. GMP's floats are heavy weight, and only a new
experimental function calls supports true IEEE rounding.
But my ieeelib.c which I contributed years ago might be a starting
point for a fast real.c replacement.
--
Torbjörn
(GMP author)
More information about the Gcc
mailing list