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

Weiming Zhao weimingz at codeaurora.org
Wed Aug 22 10:29:22 PDT 2012


Hi Chad,

 

Thanks!

 

From: Chad Rosier [mailto:mcrosier at apple.com] 
Sent: Wednesday, August 22, 2012 10:25 AM
To: Weiming Zhao
Cc: 'Commit Messages and Patches for LLVM'; 'Stephen Canon'; 'Eli Friedman'
Subject: Re: [llvm-commits] Fix Bug 13574: Add more double float shrinking
optimizations

 

Weiming,

I've applied you patch in r162363 and r162368.

 

 Chad

 

 

On Aug 21, 2012, at 6:32 PM, Weiming Zhao wrote:





Hi Chad,

 

Thanks for applying the changes to TLI.

Attached is the test case and updated optimization, where new libcall
conversions are guarded by a flag and is disabled by default.

 

Please feel free to review it.

 

Thanks,

Weiming

 

From: Chad Rosier [mailto:mcrosier at apple.com] 
Sent: Tuesday, August 21, 2012 4:33 PM
To: Weiming Zhao
Cc: Commit Messages and Patches for LLVM; Stephen Canon; Eli Friedman
Subject: Re: [llvm-commits] Fix Bug 13574: Add more double float shrinking
optimizations

 

Hi Weiming,

Sorry for the belated response.  I went ahead and applied the changes to the
TargetLibraryInfo in r162329 as this part is independent of the
optimizations.  Assuming you've addressed Stephen and Eli's concerns, please
go ahead and commit the optimization side of things including your test
cases.

 

 Chad

 

On Aug 16, 2012, at 10:33 AM, Weiming Zhao wrote:






Hi Chad & Stephen,

 

Attached is updated patch, which includes:

1.       Complete test cases, which tests both wanted and unwanted
transformations

2.       The transformation is guarded by a flag

3.       More strict constraint: both the input and output are limited to
float

 

Any comments and suggestions are welcome.

 

Thanks,

Weiming

 

From: Chad Rosier [mailto:mcrosier at apple.com] 
Sent: Wednesday, August 15, 2012 1:24 PM
To: Weiming Zhao
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] Fix Bug 13574: Add more double float shrinking
optimizations

 

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

 

 

<0001-Bug-13574-More-double-float-shrinking-optimizations-f.patch>

 

<0001-Bug-5948-More-double-float-shrinking-optimizations-f.patch>

 

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


More information about the llvm-commits mailing list