[LLVMdev] JVM Backend

Jon Harrop jon at ffconsultancy.com
Sun Nov 29 10:46:09 PST 2009


On Sunday 29 November 2009 02:06:04 you wrote:
> > So it will stack overflow on tail calls
>
> At the moment, yes. But then again, so does java.

Sure but a lot of people like me are using LLVM precisely because it offers 
these wonderful features. As long as your JVM backend does not handle these 
features correctly its utility is greatly diminished.

> Also, it looks like they're working on support for tail calls in the Da 
> Vinci Machine[1]. 

I believe that work was actually finished some time ago by my hero, Arnold 
Schwaighofer, who was also responsible for the excellent TCO implementation 
in LLVM.

> > and break with run-time errors
>
> When I said it raises an assertion, I meant at compile-time.
>
> > on structs?
>
> No, structs are supported. The only unsupported types at the moment
> (as far as I am aware) are things like i31 and f80.

How do you support structs when the JVM is incapable of expressing value 
types? Do you box every aggregate in an object? Does insertvalue construct an 
entirely new object? If so, the performance degradation will be orders of 
magnitude. Optimizing structs for the JVM is not easy and you will never get 
decent performance out of the JVM in the general case.

> > As Chris said, the LLVM world really needs any fully working solution
> > rather than a selection of incomplete solutions.
>
> I haven't been working on this project for too long - you can't expect
> it to be perfect on the first release.

Nobody is asking for perfection, just completeness.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e



More information about the llvm-dev mailing list