[llvm-commits] Fix Bug 13574: Add more double float shrinking optimizations
Weiming Zhao
weimingz at codeaurora.org
Wed Aug 15 11:33:23 PDT 2012
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.
Please help to review them.
Thanks,
Weiming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120815/b04ddd79/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Bug-13574-More-double-float-shrinking-optimizations-f.patch
Type: application/octet-stream
Size: 14748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120815/b04ddd79/attachment.obj>
More information about the llvm-commits
mailing list