[LLVMdev] How to translate library functions into LLVM IR bitcode?

Tim Northover t.p.northover at gmail.com
Sun Sep 14 23:55:10 PDT 2014


> If there's any automated way to infer about all the subroutines that one
> function needs, clang them into .bc file and link them into a stand-alone
> .bc library, that will be more than appreciated:-)

If manually compiling the files is working for you, you could try
building the entire library with "-flto" for Link-time optimisation.
The output of that will be LLVM IR (if you can convince the build
system to do it for you).

The issue is that parts of the standard library are
performance-critical and often written in assembly. If the entire file
is assembly you won't be able to produce IR very easily at all.

Cheers.

Tim.



More information about the llvm-dev mailing list