[LLVMdev] Compile programs with the LLVM Compiler as a gsoc project

Andrew Lenharth andrewl at lenharth.org
Mon Mar 31 12:49:05 PDT 2008


On Mon, Mar 31, 2008 at 2:47 PM, Andrew Lenharth <andrewl at lenharth.org> wrote:
> On Sun, Mar 30, 2008 at 11:34 PM, Kumaripaba Miyurusara Atukorala
>  <paba50 at gmail.com> wrote:
>  > 1) I thought of taking the gcc compiler and compiling it with llvm since it
>  > is easier to make test cases to test the system. Is gcc compiler already
>  > built with llvm? if so I have the linux kernel as the second option. What is
>  > your openion on this ?
>
>  We rutinely compile linux with llvm (and do LTO and custom transforms
>  on it).  So that would be novel.  However, several existing
>  optimizations break the linux kernel (and several bits of the linux
>  kernel are buggy and just happen to work with gcc (aka their
>  correctness depends on getting a pseudo random value from reading an
>  unitinialized variable)).  Tracking down and distilling minimal test
>  cases for the broken optimizations would be really useful (and very
>  painful).
>
>  There are really 2 ways to do this.  First is to do it manually.  find
>  the optimization that breaks the kernel, find the function, see what
>  it does that causes the breakage, etc.  OR, you could extend bugpoint
>  to be able to launch an external tool that performed the final linking
>  and testing of the bytecode.  This would be nice because then bugpoint
>  would give the tool two pieces, the tool would assemble the two pieces
>  into a booting kernel, run the kernel in an emulator and report back
>  to bugpoint on whether it suceeded or failed.
>
>  Obviously the second one would be a more useful addition to the llvm
>  too chain, whereas the first method would be invaluable hard manual
>  debugging.


I should add that the second method would allow bugpoint to work on
gui programs, which would be a nice thing.

Andrew



More information about the llvm-dev mailing list