
24 Dec
2010
24 Dec
'10
4:20 p.m.
On 13.12.2010 16:38, Pavel Perikov wrote:
Is it possible to make GHC-7.0.1 to generate intrinsic instructions instead of calls to C library to compute trigonometric functions?
main = do a<- readLn print $ sin a
I tried -O -msse2 -fllvm and their combinations. Generating assembly always contains calls for computation of sin
As far as I remember GHC generates FPU instructions for sinus and friends with its native code generator. However, I noted that LLVM does not do this and always jumps into the C library, although it is documented otherwise.