[LLVMdev] LLVM for JIT only use

Basile STARYNKEVITCH basile at starynkevitch.net
Sun Nov 7 14:40:58 PST 2004


Le Sun, Nov 07, 2004 at 04:14:19PM -0600, Misha Brukman écrivait/wrote:
> On Sun, Nov 07, 2004 at 11:04:58PM +0100, Basile STARYNKEVITCH wrote:

Basile>> First, I am extremely confused by the terminology. IMHO, the runtime
Basile>> libraries would include (from my JIT only perspective)

Basile>> 1. all the LLVM libraries required to JIT-generate machine code, and
Basile>> to build a representation of the LLVM instruction sequence or tree.

Basile>> Z. the garbage collection I'm coding for my toy language.

Basile>> So I really can't figure why is the LVM-GCC parser needed here!
> 
> Sorry for the confusion.  By 'runtime', I mean 'llvm/runtime' directory,
> 
> In your list, (1) is llvm/lib/VMCore and a few others, (2) you provide.
> We just have a different terminology

I did "make" inside llvm/examples/ and inside
llvm/examples/HowToUseJIT/ and expected to get an ELF executable.. But
I've only got the 2 Release/HowToUseJIT.[do] files..

But the llvm/examples/HowToUseJIT/HowToUseJIT.cpp has at line 47 a
"int main()" function. So I was waiting for an executable which I
would be able to run. (FYI, the GNU lightning library provide a tests/
directory which can easily compile a few test stuff, which build plain
executables showing simple JIT generation&execution within the same
process, and so does libjit).


> Bottom line: you don't need llvm/runtime.

What are the exact libraries I'll need from LLVM (to JIT generate
machine code)? Where are these (I would like the list of all the
lib*.{a,so} and all headers <*.h> in /usr/local/ on my
Linux/Debian/Sid/x86 system)? How are these supposed to be installed
(if possible, I want to avoid llvm-gcc, because I hpave trouble
compiling the latest CVS of it, and because I believe I really don't
need it)?

How can I tell LLVM the address where I want the generated code to go
(or how can I get this address, preferably with a "destructor"
function to release the memory)? I coded a garbage collector which
should garbege generated code...

How do I plug my copying GC into LLVM? It has to know about the stack
frames, etc... (I mostly need the location inside the stack frames of
GC-ed pointers)


I'm sorry to ask such basic questions, but the documentation don't
help me much (and I am a bit lost in it.. I don't care about any kind
of llvm-gcc or llvm-ld, I just want to generate and then run code in
memory!)

If some kind LLVM person is in charge of LLVM documentation, I am
missing a "using LLVM for JIT machine-code generation for dummies"
page -which would explain the examples/HowToUseJIT/ and similar-
Apparently, JIT is a by-product of LLVM, but it is the main feature
that attracts me here...

BTW, are there some European LLVM users & developers (working & living
in Europe) or is LLVM only a US software?

Again, sorry for asking such basic questions... I'm a bit lost in the
(intimidating) documentation....

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France




More information about the llvm-dev mailing list