Has anyone looked at porting the llvm interpreter to an embedded system? I've been looking into how to portably run bytecode on a lightweight embedded processor and it seemed like interpreting llvm bytecode might be a solution. We would have to write the interpreter in c and it would have to fit in a few k of ram and a dozen or less k of code space, but I figured I'd ask to see if people think it might be possible. Thanks, Chris
On Wed, 14 Sep 2005, Chris Morgan wrote:> Has anyone looked at porting the llvm interpreter to an embedded > system? I've been looking into how to portably run bytecode on a > lightweight embedded processor and it seemed like interpreting llvm > bytecode might be a solution. We would have to write the interpreter > in c and it would have to fit in a few k of ram and a dozen or less k > of code space, but I figured I'd ask to see if people think it might > be possible.I'm not aware of anyone working on this. There are several companies using LLVM as a static compiler for their embedded chips, but I'm not aware of anyone using the interpreter in this way. You would probably want to write a from-scratch interpreter: the currently LLVM interpreter is very heavy weight and slow (it was built rapidly to get it working fast, not as something that would be a good interpreter). Another option is that you could write a simple backend for a pseudo target that is really easily interpretable. This would let you JIT compile LLVM to this pseudo target, then interpret the result. This would be appealing if you find LLVM too hard to interpret (I don't know why this would be the case, but just pointing out the option). -Chris -- http://nondot.org/sabre/ http://llvm.org/
Darthrader (sent by Nabble.com)
2006-Feb-03 10:22 UTC
[LLVMdev] llvm interpreter for embedded system
Hi chris, I am a novice in compilers and stuff.I want to write an interpreter for AST but I haven't found any links to how to begin :( .Can u give a few pointers to where I can get some material on interpreter basics etc? TIA. Darthrader -- View this message in context: http://www.nabble.com/llvm-interpreter-for-embedded-system-t308478.html#a2737316 Sent from the LLVM - Dev forum at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060203/6d391fd2/attachment.html>
On Fri, 3 Feb 2006, Darthrader (sent by Nabble.com) wrote:> I am a novice in compilers and stuff.I want to write an interpreter for > AST but I haven't found any links to how to begin :( .Can u give a few > pointers to where I can get some material on interpreter basics etc?I'm sorry but this is off-topic for this list. There are lots of books that talk about interpreter basics: I'd suggest looking at some of those. If you're specifically interested in the LLVM interpreter, we can help with that of course. -Chris -- http://nondot.org/sabre/ http://llvm.org/