Re: [C--] C-- status report: yes, someone is (barely) out here
Chris Lattner <[email protected]> Sun, 17 Dec 2006 15:08:16 -0800 (PST)
| Newsgroups | gmane.comp.lang.c-- |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 17 Dec 2006, Basile STARYNKEVITCH wrote: > Le Sun, Dec 17, 2006 at 01:14:48PM -0800, Chris Lattner écrivait/wrote: >> Another option that you didn't, but Norman, did, mention: LLVM >> (http://llvm.org/). > > Assuming I want to play with LLVM for dynamic code generation only, > what is the starting documentation (or trivial example) to look at? > > In other words, I only want to use LLVM as a competitor to Libjit: I > want to call LLVM to build in memory some intermediate code > representation, and then to compile it (either in memory, or perhaps > as shared objects) on Linux/AMD64, and at last being able to run the > just so generated machine code Some trivial examples are in the llvm/examples directory, e.g. the HowToUseJIT example: http://llvm.org/cvsweb/cvsweb.cgi/llvm/examples/HowToUseJIT/HowToUseJIT.cpp?rev=1.12&content-type=text/x-cvsweb-markup The Fibonacci example is somewhat more interesting: http://llvm.org/cvsweb/cvsweb.cgi/llvm/examples/Fibonacci/fibonacci.cpp?rev=1.12&content-type=text/x-cvsweb-markup We even have a more complex example that jit's on multiple threads: http://llvm.org/cvsweb/cvsweb.cgi/llvm/examples/ParallelJIT/ParallelJIT.cpp?rev=1.6&content-type=text/x-cvsweb-markup -Chris -- http://nondot.org/sabre/ http://llvm.org/ _______________________________________________ Cminusminus mailing list [email protected] https://cminusminus.org/mailman/listinfo/cminusminus