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] |
- From: "Uros Bizjak"
- To: "Richard Guenther"
- Cc: "Paolo Bonzini" , "GCC Patches"
- Date: Fri, 2 Feb 2007 08:21:48 +0100
- Subject: Re: [PATCH, middle-end]: Convert (int)logb() into ilogb().
- References: 5787cf470701310028r4081b607naa7bd7f6a48f2950@mail.gmail.com 45C05AAF.5060909@lu.unisi.ch 5787cf470701310158o784f69cco68e92c7ddbb89b16@mail.gmail.com 84fc9c000701310356j3e2d688cpba49cfb3d198e7a7@mail.gmail.com
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] |