dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libjit-developers] libjit vs LLVM


From: Chris Lattner
Subject: Re: [Libjit-developers] libjit vs LLVM
Date: Fri, 28 May 2004 01:20:05 -0500 (CDT)

On Fri, 28 May 2004, Rhys Weatherley wrote:

> On Friday 28 May 2004 02:43 pm, Chris Lattner wrote:
>
> > > P.S. LLVM is very cool - I have nothing against it per se.  I've merely
> > > set my sights a little lower in the interest of VM authors.
> >
> > I guess I really don't understand this attitude.  I imagine that you want
> > libjit to continue growing into a capable and powerful system, at which
> > point you will add some of the things that LLVM provides.  The alternative
> > is to go the direction of GNU lightning, which is a very restricted system
> > that is pretty hard to use for many tasks: and it certainly does not
> > provide performance.
>
> The choice isn't binary: super-optimization or no optimization.  There are
> plenty of shades in the middle, and libjit already generates better code than
> GNU Lightning with a much nicer API.  Of course libjit will grow.  Everyone
> has to start somewhere.

Sure, I guess I was supposing that when libjit grows, it will develop the
kinds of things that LLVM already has, that you don't like.

> There's no law that says there can be only one project of this kind.  You
> obviously feel that you have a lead in this area.  Feel free to exploit it to
> my disadvantage if you'd like. :-)

It's not that.  The problem is that there is a limited marked for this
kind of thing.  Open source is really bad because everyone reinvents the
wheel.  In the domain of word processors this is more or less okay: there
is a huge audience for it.  In the domain of compiler related systems the
domain (compiler writers/front-end developers/JIT clients) is much
smaller.  I just think it would be more beneficial for the community as a
whole if we worked together, that's all.

> If you believe that I'm mischaracterising LLVM in the documentation, I will
> replace the reference.  You are probably correct that LLVM is generic as to
> front-end language.  But LLVM is a hammer, where I need a screwdriver.
>
> How about the following:
>
>     LLVM has similar characteristics to libjit, in that its intermediate
>     format is generic across front end languages.  LLVM can be adapted to
>     function as a JIT, but its primary purpose is as a tool for writing highly
>     optimizing compilers.

The problem is that LLVM is an infrastructure for building compiler
related stuff, not a tool.  There are tools built from LLVM (for example a
C++ compiler), but LLVM itself is a modular system that lets you build
things like this.  As such, LLVM isn't "adapted to function as a JIT", it
*INCLUDES* a JIT as one of its primary components.

The primary advantage that libjit has over LLVM seems to be the
availability of a C API.  Maybe you should say:

     LLVM has similar characteristics to libjit, in that its intermediate
     format is generic across front end languages, and it includes JIT
     compilers for multiple targets.  libjit provides an API written in C
     that makes it easier to integrate into non-C++ programs.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]