[LLVMdev] Summer of Code

Chris Lattner sabre at nondot.org
Wed Apr 26 10:03:00 PDT 2006


On Wed, 26 Apr 2006, Ralph Corderoy wrote:
>> If you're thinking of doing a backend, the LLVM project would probably
>> benefit more from implementing the virtual backend and its
>> Interpreter/JIT. This is a long standing project that could
>> dramatically increase the performance of the ExecutionEngine. The idea
>> is to write a backend for a virtual machine that closely matches the
>> semantics of LLVM and then implement the virtual machine.
>
> I've seen this mentioned before.  What's the advantage of this over
> JITting to the host CPU ISA?  It would seem to be adding another layer
> since presumably you'd want to have JIT in the VM for the LLVM.

There is none.  This is to improve the interpreter.

The interpreter currently has two problems:

1. It's really slow (which Reid's comment addresses).  This is because the
    interpreter was hacked together very quickly with little thought or
    desire to be efficient.  Each register access requires multiple
    std::map lookups, for example.
2. The interpreter has no Foreign Function Interface, which means that it
    is extremely limited when calling external functions that are not in
    LLVM bytecode form.  In practice, this prevents the interpreter from
    running *many* programs.

Progress on either would be good, but personally I don't consider the 
interpreter to be very high priority (particularly when a full port of the 
LLVM code generator is often 4-5000 lines of code).

  -Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list