Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

llvm on x86 barebone?

Does anyone know of any project involving running LLVm without an OS, i.e. directly on x86 hardware?

like image 850
anon Avatar asked Feb 28 '10 07:02

anon


1 Answers

LLVM can statically compile code which can run directly on x86 hardware. However, the LLVM JIT relies on most of the LLVM libraries. It is not possible to compile these for a bare-bones x86 target.

In order to base an OS on LLVM IR and have it be JITed I see two options:

  1. Write a new JIT engine designed to be run directly on x86 hardware. This would require re-writing all of the optimization passes if you wanted it to have any benefit over static compilation.

  2. Take the smallest kernel you can that is easy to target LLVM for, then run the JIT on that. This means that the core of your OS won't be JITed, but a large part of it could be.

like image 108
Michael Spencer Avatar answered Oct 12 '22 04:10

Michael Spencer