[LLVMdev] Finding call points to a function
komurav1 at illinois.edu
Wed Sep 9 21:58:05 PDT 2009
I am writing an LLVM Pass and I would like to know how would I do the
1. I have a function foo, and I need to get all the call points calling this
function in each Function of the Module. The only way I can think of is to
iterate over the BasicBlocks of each Function, look for all the Call
Instructions and check if the called function is foo. I was wondering if
there is any other better way to do this.
2. Is it possible to distinguish a class method from a non class method
while analyzing the emitted LLVM code for a C++ program? Because, I need to
interpret the calls made to foo differently in a class method and in a non
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev