Uros Bizjak - Re: [PATCH, middle-end]: Convert (int)logb() into ilogb(). (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

On 1/31/07, Richard Guenther richard.guenther@gmail.com wrote:

This patch implements a small optimization opportunity by converting (int)logb() into ilogb() for -ffast-math.

Cute. Why not do so in fold-const.c?

Because there are no constants involved. ;)

Also, it converts floating point result into integer, so IMO its place should be near (int)rint() -> lrint() code in convert.c that does exactly the same transformation.

That should also move to fold-const.c ... (in fact, all the BUILT_IN tansformations should).

I looked into fold-const.c how to move these functions there, but IMO this is not a kind of simple task I was hoping for.

Since my proposed patch just extends functionality, already present in convert.c, could I propose that my patch goes into mainline (it works OK) and a person with more middle-end knowledge moves whole pack into more appropriate place?

Thanks, Uros.


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