Displaying 4 results from an estimated 4 matches for "getcallee".
2011 Jan 17
5
[LLVMdev] How to get the name and argument of a function
Hi everyone:
The code I am analyzing is :
int main()
{
int i = 0;
printf("hello world!");
printf( "%d" , i );
}
I want to get each place where printf is called, and the argument used
during that call.
so I write llvm pass code like:
void Myfunction( Function & F){
for( Function::iterator b = F.begin() , be = F.end() ;
2011 Jan 18
0
[LLVMdev] How to get the name and argument of a function
...gt;
> How could I get the function name and the arguments when I know an
> Instruction is a function call?
There's a worked example at
http://wiki.llvm.org/HowTo:_Find_all_call_sites_of_a_function .
With the CallInst/InvokeInst you can query getArgOperand() to get the
arguments or getCallee() which return a Function -- or it might not. If
the call is an indirect call (ie., function pointer) then you don't know
what it's calling. Ignoring indirect calls, you can call getName() on a
function to get its name.
Personally, I rely heavily on the doxygen to find my way around the...
2011 Jan 19
0
[LLVMdev] How to get the name and argument of a function
...gt; an
>>>> Instruction is a function call?
>>> There's a worked example at
>>> http://wiki.llvm.org/HowTo:_Find_all_call_sites_of_a_function .
>>>
>>> With the CallInst/InvokeInst you can query getArgOperand() to get the
>>> arguments or getCallee() which return a Function -- or it might not. If
>>> the call is an indirect call (ie., function pointer) then you don't
>>> know
>>> what it's calling. Ignoring indirect calls, you can call getName() on a
>>> function to get its name.
>>>
>&g...
2014 Jun 12
3
[LLVMdev] Creating and implementing an analysis group out of tree
Hi Eli,
Thanks for the link! I'm able to compile a standalone pass outside of the
source tree, and I'm obviously ably to compile analysis groups inside the
source tree. However, the problem comes when I try to do what the tutorial
suggests to create an analysis group outside of the source tree.
My understanding is that building out of tree requires different methods to
register the