Subject: Re: [boost] Interest in an LLVM library?
From: Avi Kivity (avi_at_[hidden])
Date: 2015-11-22 08:29:21
On 11/20/2015 07:35 PM, Andy Jost wrote:
> Avi Kivity wrote:
>> do you plan to allow integration of the JITted code with the calling program?
> The LLVM JIT compiler will resolve functions from the host program. They must be externally defined in the embedded program.
>> and even inline functions from the calling program (perhaps consulting an intermediate representation of the calling program on disk)?
> That is certainly possible, though perhaps difficult for a Boost library to do. I believe Clang has options for embedding a program's LLVM into its executable. Perhaps the JIT compiler is smart enough to use that if it's available. Anyway, it sounds like a good feature to consider for this library.
>> These capabilities would allow JIT compilation of user-provided programs that run on user-provided data sets, for example in big data applications.
> Yes, it is certainly possible. I have written commercial software that does this (though not with this EDSL), so I can say with confidence that it is practical. Rather than inline functions automatically from the host program, I think it would be easier to build a runtime library to link and inline with user programs. It's easy to compile C/C++ to LLVM.
Then consider me a user.
I hope the "runtime library" you refer to is in some intermediate
representation, having been partially compiled from C++ when the product
is built, and then inlined into the generated code during JIT time. I'd
hate to run the full C++ compiler during JIT time.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk