[llvm-commits] [llvm] r55968 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Bill Wendling isanbard at gmail.com
Sun Sep 21 17:45:00 PDT 2008


On Sep 21, 2008, at 4:17 PM, Chris Lattner wrote:

> On Sep 8, 2008, at 5:28 PM, Bill Wendling wrote:
>
>> Author: void
>> Date: Mon Sep  8 19:28:24 2008
>> New Revision: 55968
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=55968&view=rev
>> Log:
>> Add support for floating-point calculations of log2 with limited
>> precisions of 6
>> and 18.
>
> Hi Bill,
>
> This looks like great work, but is it possible to factor this
> somehow?  It looks like a lot of this is building expressions of the
> form (x+c1)*c2.  Maybe a helper that took the two constants would
> simplify stuff?
>
> Alternatively, maybe you could just change:
>
>                               DAG.getConstantFP(APFloat(APInt(32,
> 0xbcd2769e)), MVT::f32));
>
> Into a call to a static function:
>
> getF32Cst(DAG, 0xbcd2769e)
>
> which would return the SDOperand.
>
I have deemed this a "good idea" and have henceforth totally  
implemented it.

:-)

-bw




More information about the llvm-commits mailing list