Hi Mike, thanks for the suggestion. Do you know if there are any articles around that explains how to use LLVM to build a VM that should work like mine ? I've read something around (mostly source code) but a good article/doc will be perfect Gabriele Il giorno 04/apr/09, alle ore 19:23, Mike Stump ha scritto:> On Apr 4, 2009, at 1:20 AM, Gabriele Farina wrote: >> Which approach do you suggest ? are there any alternatives ? > > My take, do the second one first, gain some experience and have some > fun. You can use this to double check the performance and > suitability. But mid-term, I'd say, do both. This allows you to > compare the performance of each solution against the other, compile > time, compile time memory pressure, run time and run time memory > usage. You're then in a better position to decide which path suits > what usage styles you have. Long term, you can then see if it makes > sense to trim a solution out. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Sunday 05 April 2009 08:34:21 Gabriele Farina wrote:> Hi Mike, > > thanks for the suggestion. Do you know if there are any articles > around that explains how to use LLVM to build a VM that should work > like mine ? > I've read something around (mostly source code) but a good article/doc > will be perfectThere are a series of articles in the OCaml Journal describing the construction of a VM using LLVM: http://ocamlnews.blogspot.com/2009/03/building-virtual-machine-with-llvm-part.html The VM uses expression trees rather than bytecode. However, there is another article in the same journal describing the construction of a bytecode compiler using LLVM: http://ocamlnews.blogspot.com/2008/09/writing-bytecode-compiler-using-llvm.html -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
Hello, Gabriele> thanks for the suggestion. Do you know if there are any articles > around that explains how to use LLVM to build a VM that should work > like mine ? > I've read something around (mostly source code) but a good article/doc > will be perfectHave you read the 'Kaleidoscope' tutorial? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hi, Isn't it intended to explain how to build a compiler for a custom language that targets LLVM-IR ? Is it useful also to understand how to build a VM that is meant to execute custom bytecode (converting it to LLVM-IR previously) ? Thanks, Gabriele Il giorno 05/apr/09, alle ore 11:36, Anton Korobeynikov ha scritto:> Hello, Gabriele > >> thanks for the suggestion. Do you know if there are any articles >> around that explains how to use LLVM to build a VM that should work >> like mine ? >> I've read something around (mostly source code) but a good article/ >> doc >> will be perfect > Have you read the 'Kaleidoscope' tutorial? > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State > University > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev