library functions

Hi,

Is there any way to analyze library functions using LLVM, in the same manner as source code functions?

Thanks.
-Apala

Hi ,
I doubt LLVM has the infrastructure in place to do so ,One way to accomplish this by implementing decompiler to convert library functions to LLVM IR and run the LLVM analyze pass over converted LLVM IR ,Then revert back from LLVM IR to your library format.

Thanks
~Umesh

Hi,

I doubt LLVM has the infrastructure in place to do so ,One way to accomplish
this by implementing decompiler to convert library functions to LLVM IR and
  run the LLVM analyze pass over converted LLVM IR ,Then revert back from LLVM
IR to your library format.

LLVM knows the semantics of many library functions, see SimplifyLibCalls.cpp.
However if you mean that you want LLVM to see the actual body of library
functions etc, then you are basically trying to do link-time optimization,
and the steps are something like this: build your library with -flto, build
your program with -flto, link them together using an LLVM aware linker.

Ciao, Duncan.