[LLVMdev] using GCC LTO files as a frontend to dragonegg?

Duncan Sands baldrick at free.fr
Mon Sep 13 01:27:56 PDT 2010


Hi Marcus,

> With GCC, it is possible to compile GIMPLE from an object file back to
> assembly.  With Dragonegg, it seems to be a NOP.  (See below for a
> comparison.)
>
> This appears it could be a nice way to mix the strengths of GCC and
> LLVM.  If it worked..  Should it?

I didn't have time to work on LTO with dragonegg yet, but it's on my list
of things to do.  What I would like is: when compiling code with -flto and
dragonegg, LLVM bitcode is recorded alongside the assembler in special ELF
sections, just like gcc stores gimple when -flto is used without dragonegg.
When reading such files with the lto frontend and dragonegg, any gimple gets
turned into LLVM bitcode, and gets combined with any LLVM bitcode read-in
from ELF sections; the combined module is then optimized using LLVM's link
time optimizations.  Hopefully this is feasible, as I said I didn't work on
it yet.

Ciao,

Duncan.



More information about the llvm-dev mailing list