Hi Justin,<br><br>I think having .bc math libraries for different backends makes perfect sense! For example, in case of NVPTX backend we have the following problem: many math functions that are only available as CUDA C++ headers could not be easily used in, for instance, GPU program written in Fortran. On our end we are currently doing exactly what you proposed: generating math.bc module and then link it at IR-level with the target application. There is no need for SIMD, but having .bc math library would still be very important!<br>
<br>- D.<br><br><div class="gmail_quote">2013/1/27 Justin Holewinski <span dir="ltr"><<a href="mailto:justin.holewinski@gmail.com" target="_blank">justin.holewinski@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I'm wondering if it makes sense to instead supply a bc math library.  I would think it would be easier to maintain and debug, and should still give you all of the benefits.  You could just link with it early in the optimization pipeline to ensure inlining.  This may also make it easier to maintain SIMD functions for multiple backends.</div>

<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Jan 27, 2013 at 8:49 AM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>----- Original Message -----<br>
> From: "Dimitri Tcaciuc" <<a href="mailto:dtcaciuc@gmail.com" target="_blank">dtcaciuc@gmail.com</a>><br>
> To: <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a><br>
> Sent: Sunday, January 27, 2013 3:42:42 AM<br>
> Subject: [LLVMdev] SIMD trigonometry/logarithms?<br>
><br>
><br>
><br>
> Hi everyone,<br>
><br>
><br>
> I was looking at loop vectorizer code and wondered if there was any<br>
> current or planned effort to introduce SIMD implementations of<br>
> sin/cos/exp/log intrinsics (in particular for x86-64 backend)?<br>
<br>
</div></div>Ralf Karrenberg had implemented some of these as part of his whole-function vectorization project:<br>
<a href="https://github.com/karrenberg/wfv/blob/master/src/utils/nativeSSEMathFunctions.hpp" target="_blank">https://github.com/karrenberg/wfv/blob/master/src/utils/nativeSSEMathFunctions.hpp</a><br>
<a href="https://github.com/karrenberg/wfv/blob/master/src/utils/nativeAVXMathFunctions.hpp" target="_blank">https://github.com/karrenberg/wfv/blob/master/src/utils/nativeAVXMathFunctions.hpp</a><br>
<br>
Opinions on pulling these into the X86 backend?<br>
<br>
 -Hal<br>
<br>
><br>
><br>
> Cheers,<br>
><br>
><br>
><br>
><br>
> Dimitri.<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br>