[LLVMdev] Walking thru CallGraph bottom up
simone.at at gmail.com
Mon Mar 2 07:54:57 PST 2015
> Obviously, if you want to analyze the call graph of an entire program, you need to collect the information from across compilation units. In LLVM, the best way to do that is to link the bitcode files together into a single bitcode file. This can either by done using llvm-link (which requires changing the Makefiles of most programs) or by adding your passes into libLTO (which is more work but allows you to do whole-program analysis with little/no modification to program Makefiles).
this is actually what I am doing.
I have a simple program that has a main that call 2 functions.
Those 2 functions are in two different .c files.
So I create the BC file with clang for the 3 files.
I link them together with llvm-link and then I disassemble it.
However when I run my pass it still can’t see the external calls.
Why is that?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev