frexp function misoptimization

Ian Lance Taylor iant@google.com
Sat Mar 8 02:18:00 GMT 2008


Jeremy Sanders <jss@ast.cam.ac.uk> writes:

> I notice on x86_64 Linux with gcc-4.1.2, that if I make a call to frexp()
> from math.h, this function is not inlined in the assembly output
> (with -O2). I've tried -ffast-math as well.
>
> As this function could be trivially inlined (it's just a matter of getting
> the correct bits from the stored number), is this a gcc misoptimization or
> is glibc the culprit?

It's just that nobody got around to it.  As it happens, inlining of
frexp is a new optimization in gcc 4.3.

Ian



More information about the Gcc-help mailing list