[LLVMdev] Whole program compile/link

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Mon Jul 27 12:05:32 PDT 2009

> We ran into to this. There is not any easy solution here. The
> optimizer does not know what not to destroy if the code generator
> introduces new uses after optimization phase.  One solution is to keep
> this support functions in native .a (archive file) and let native
> linker complete the final link stage to link in these support
> functions.

This is exactly what we are doing for PIC16 port; 
Would it make sense that front-end (clang) had a way to know if such
operations are native or not; if not, it would generate calls to
appropriate standard intrinsic routine... 
These intrinsics can be implemented as .bc (to be linked by llvm-ld,
enabling further lto optimizations because these are standard intrinsics
and optimizers can know about them) or as target native file (to be
linked by native linker)


More information about the llvm-dev mailing list