[LLVMdev] Math Library Intrinsics as native intrinsics
natebegeman at mac.com
Tue Apr 14 10:12:05 PDT 2009
On Apr 14, 2009, at 9:46 AM, Dan Gohman wrote:
> There's at least one other LLVM user which would find these
> useful, and probably more, so it may be appropriate to merge
> this into the main tree. I'm interested to hear if anyone
> else has an opinion here.
I'd rather not see them in the main tree, since there's no real
explanation of what the benefits would be vs. the current model of
treating libm calls as actual function calls that pass and return
arguments of a known type.
> The text in LangRef.html that describes the semantics of
> llvm.pow needs improvement. Here's an attempt at an
> improved description of error handling for LLVM intrinsic
> math functions:
> The @llvm.math intrinsics use floating-point exceptions
> according to IEEE rules for the corresponding math functions.
> LLVM IR does not currently define the initial state of the
> floating-point status or control flags, or an interface for
> querying or setting them. The value of errno after a call to
> an @llvm.math intrinsic is undefined.
What is gained by this vs. having a target compile a C libm with LLVM
using target builtins for the handful of things it actually supports?
I don't see any explanation of the actual problems people are trying
to solve here, just "we'd like to make this change".
More information about the llvm-dev