[LLVMdev] LLVM code emittion and C++ compiler compatibily
Chris Lattner
sabre at nondot.org
Mon Nov 6 12:48:50 PST 2006
On Mon, 6 Nov 2006, [ISO-8859-2] Žiga Osolin wrote:
> The problem is this is not possible, because what I would compile to JIT
> are actual classes. The integration of C++ and JIT code is very
> important; for example we would create our own vtbls with JIT-ed code
> addresses as the function call target.
Ok. Realize that this ties you to a specific compiler version though.
> There is one quite simple approach that I might take (I just came up
> with it). I could create special really small wrappers for each of these
> JIT-ed function, that would make the conversion to the common format
> (being either GCC or VC++). This wrapper could also extract all return
> values correctly and pass them to native C++ code as required. I think
> this would be the neatest solution, but would require a speed penalty.
> The actual wrapper code could be OS dependant:)
Seems feasible.
> Is there any interest for llvm to have such features, such as
> integration directly to GCC compiled code, or VC++ compiled code (at the
> same time)? Because maybe it could be the part of llvm instead of
> baadengine, if you wish of course.
It depends on precisely how it integrates with llvm and how separated it
is from other components.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list