LLVM for plugins and more


I've been looking into LLVM and I'm quite exited about the power it provides.

Now, I'm not into compiler/optimizer development, which I guess is the main
focus of LLVM. However, I've looked at the publications about safety and I'm
amazed that the overhead is so low (ref "Segment Protection for Embedded
Systems Using Run-time Checks").

Most of this work targets embedded systems, but I'm wondering if it also would
be usefull for hardware with memory protection. Safe injection of code into
an address space or software-based process protection could have many uses.

- Plugins
- Separating/protecting execution contexts. Like processes without the
overhead of changing address space.
- Controlled injection of user-level code into a monolithic kernel.
- Provide safety in a Singularity-like kernel

Now, my question is whether LLVM is suited for this type of use and, if so,
are there any projects that work towards this goal?

At the top of my head, I guess a transform that detects illegal memory
references, a way to call external functions safely and some kind of tracking
of external resources, would do the trick.

Hans Henrik Happe