[cfe-commits] r72718 - /cfe/trunk/include/clang/AST/Builtins.def

Eli Friedman eli.friedman at gmail.com
Tue Jun 2 11:22:40 PDT 2009


On Tue, Jun 2, 2009 at 10:52 AM, Chris Lattner<clattner at apple.com> wrote:
> On Jun 2, 2009, at 10:45 AM, Eli Friedman wrote:
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=72718&view=rev
>>>> Log:
>>>> Add builtin declarations for the variants of sin and cos.
>>>
>>> Nice.  I don't think sin/cos set errno though, unlike sqrt.  Aren't they
>>> const functions?
>>
>> I don't think glibc sets it, but I don't know about other
>> implementations; see
>> http://opengroup.org/onlinepubs/007908775/xsh/sin.html .
>
> Getting sin/cos set to be readnone at the codegen level is really important
> for performance.  How should we handle this on targets where it is safe?  On
> MacOS, none of the libm functions set errno, but with glibc things are more
> complex.

I suppose we should just follow the lead of llvm-gcc; I haven't looked
into the details of the requirements here.  Note that we should
already be getting the ideal code on Darwin anyway because it's marked
with "e".

-Eli




More information about the cfe-commits mailing list