[llvm-commits] Fix Bug 13574: Add more double float shrinking optimizations

Chad Rosier mcrosier at apple.com
Wed Aug 15 13:24:26 PDT 2012


Thanks, Weiming.  Once complete I'll give the patch a full review.

 Chad

On Aug 15, 2012, at 1:13 PM, Weiming Zhao wrote:

> No problem.  I can add one test case per function.
>  
> Weiming
>  
> From: Chad Rosier [mailto:mcrosier at apple.com] 
> Sent: Wednesday, August 15, 2012 11:42 AM
> To: Weiming Zhao
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] Fix Bug 13574: Add more double float shrinking optimizations
>  
>  
> On Aug 15, 2012, at 11:33 AM, Weiming Zhao wrote:
> 
> 
> Hi,
>  
> This patch fixes http://llvm.org/bugs/show_bug.cgi?id=13574
>  
> Current LLVM only supports 5 double->float shrinking optimizations (floor->floorf, ceil->ceilf,round->roundf, rint->rintf() and nearbyint->nearbyintf).
>  
> This patch adds more math functions, for example, pow->powf, sin->sinf, cos->cosf, etc.
>  
> In this patch:
> 1.     Since cos(), pow() and exp2() already have their own optimizers: CosPot, PowOpt and Exp2Opt, respectively, I let them inherit from UnaryDoubleFPOpt and in their CallOptimizer(), I let them to call the base class’s CallOptimizer() first.
> For this change, I have to hoist the definition of UnaryDoubleFPOpt ahead of CosOpt.
>  
> 2.       Since some functions are not available on Windows, I updated TargetLibraryInfo to mark them as unavailable.
>  
> 3.       A unit test case is updated to test this patch.
>  
> At the very least you should have one test case per library function that you've added.
>  
>  Chad
> 
> 
>  
> Please help to review them.
>  
> Thanks,
> Weiming
> <0001-Bug-13574-More-double-float-shrinking-optimizations-f.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120815/ece8648d/attachment.html>


More information about the llvm-commits mailing list