[LLVMdev] sincos functions

Suresh Purini suresh.purini at gmail.com
Thu Sep 15 22:46:18 PDT 2011


I am not sure how important the optimization is. I found this
optimization, when I am trying to improve the performance of the
almabench.c program in Coyote. On my machine:

1) With icc it takes 4 seconds.
2) With gcc it takes 8 seconds
3) With llvm it takes 12 seconds.

gcc and icc are using 'sincos' functions with icc using a vectorized
implementation of 'sincos' function.

However, I will open a bugreport on this.


On Thu, Sep 15, 2011 at 5:59 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Suresh,
>>    I was trying to compare the performance of icc, gcc and llvm on the
>> program almabench.c in Coyote Benchmark suite. Here is a line of code
>> from the program.
>>   da   = da + (ca[np][k] * cos(arga) + sa[np][k] * sin(arga)) * 0.0000001;
>> gcc and icc are performing way better than llvm as they are using
>> 'sincos' library function to compute the sin and the cos of the
>> argument in a single shot. However llvm is computing sin and cos
>> seperately.
>> Is there any compiler option which can enable the code generator to
>> use 'sincos' function against 'sin' and 'cos' functions seperately.
> no, it hasn't been implemented in LLVM yet.  Please open a bugreport if this
> optimization is important for you.
> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list