[LLVMdev] LLVM for numerical computations
sabre at nondot.org
Mon Oct 30 10:47:24 PST 2006
On Mon, 30 Oct 2006, Luc Bourhis wrote:
> Am I correct? Does it make sense to use LLVM for such a purpose?
Yes, that is a standard "jit compile vs interpret" scenario. LLVM should
work well for that.
> How would the functions defined in <cmath> be called from the LLVM code?
Just use standard calls to external functions, the JIT will autoresolve
them to the current process.
> How would I best specify in LLVM where to find the values of the
> independent variables? That is to say the inputs for the whole
> computation LLVM will perform…
You probably want to make one LLVM function per computation tree, the
inputs to this would naturally become arguments to the function.
More information about the llvm-dev