[LLVMdev] CallGraph

Alexandru Ionut Diaconescu alexandruionutdiaconescu at gmail.com
Fri Apr 26 02:19:29 PDT 2013


Hello,

I try to make a big CFG (control flow graph) by combining all the CFG-s
from all the functions of a module. I still have one problem : I want to
get the links between functions.

For CFG-s, I used CallGraphNode->second->getFunction, then
Function_iterators and succ_iterators, so I have all the links between BBs.
Now, the questions is how do I link BBs from different functions?

I can do it in a way not so elegant. Take the last BB of every function,
then getTerminator and see that function it is called and then link to
(instruction-2-instruction).

There must be there a better way to get the linkage between BBs that are in
different functions.

Thank you for any help !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130426/58e26404/attachment.html>


More information about the llvm-dev mailing list