[LLVMdev] LLVM "Native" Backend

Reid Spencer rspencer at reidspencer.com
Fri Mar 16 15:52:31 PDT 2007


Hi Christopher,

On Fri, 2007-03-16 at 16:57 -0500, Christopher Lamb wrote:
> Having read through the documentation and browsed the code what are
> the missing pieces, if any, required to implement a "native" LLVM
> backend that:
> 
> 
> * is able to produce loadable (ELF) object files with DWARF debugging
> information
> * handle inline assembly
> * perform linker all necessary linking fixups
> 
> 
> This assumes that there will be no native object file linking stage in
> the tool chain.

Which assumes that there's only one translation unit. Given that
scenario, its doable, currently.

> 
> 
> From what I can tell the ELF writer should be able to produce the
> object files, but a DWARF-in-ELF writer would have to be created to
> insert the debugging information into the ELF file.

We currently support DWARF/ELF on x86 and PPC. Not sure about other back
ends.

> 
> 
> Either the inline assembly would be reverse compiled or handled by
> custom pass. I'm not sure what the options are here...

Inline assembly is well supported although not as completely as gcc. For
example, it provides enough to compile the Linux kernel.

> 
> 
> Am I on the right track?
> --
> Christopher Lamb
> christopher.lamb at gmail.com
> 
> 
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list