llvm interpreter for embedded system

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

llvm interpreter for embedded system

Chris Morgan-2
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

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: llvm interpreter for embedded system

Chris Lattner
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/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: llvm interpreter for embedded system

Darthrader
In reply to this post by Chris Morgan-2
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
Reply | Threaded
Open this post in threaded view
|

Re: llvm interpreter for embedded system

Chris Lattner
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/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev