[LLVMdev] Pure external functions
Lennart Augustsson
lennart at augustsson.net
Tue Feb 17 03:12:12 PST 2009
You need to set the readnone attribute. I set it on the call instruction.
-- Lennart
On Tue, Feb 17, 2009 at 10:37 AM, Jon Harrop <jon at ffconsultancy.com> wrote:
> On Tuesday 17 February 2009 09:46:07 Duncan Sands wrote:
>> Hi,
>>
>> > Lennart Augustsson mentioned on his blog that he got substantial
>> > performance improvements by conveying to LLVM when external functions
>> > (e.g. tanh) were pure.
>>
>> first note that tanh is not pure, because the result depends on the current
>> floating point rounding mode.
>
> Ugh.
>
>> However, if you are willing to sacrifice
>> complete numerical correctness, you can give llvm-gcc the -ffast-math flag
>> and, voila!, tanh becomes pure.
>
> How do you do the equivalent from the JIT?
>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/?e
> _______________________________________________
> 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