Displaying 4 results from an estimated 4 matches for "getcallgraph".
2015 Oct 09
2
Get instance of CallGraph of a module in the pass
Hello,
I want an instance of CallGraph in my pass. By looking at -dot-callgraph
source, I've tried something like this:
CallGraphWrapperPass *CGWP = new CallGraphWrapperPass();
PM.add(CGWP);
CallGraph *CG = &CGWP->getCallGraph();
PM.add(new MyPass(CG));
I get the following error:
/home/riyad/installs/llvm-3.7.0/include/llvm/PassSupport.h:95:38: error: no
matching constructor for initialization of
'MyPass'
Pass *callDefaultCtor() { return new PassName(); }
My guess is pass manager needs pass with defaul...
2017 Nov 30
1
How to count instructions in a function?
Thanks so much John! That works :)
Previously I wrote a pass that inherited from CallGraphWrapperPass and used
its getCallGraph() function within runOnModule() which resulted in
segmentation faults for me. Not sure why that happened, perhaps callgraph
wasn't setup by the time runOnModule() was called internally. If you know
why, kindly enlighten me and perhaps document the behavior for the benefit
of others.
Your email...
2017 Nov 29
2
How to count instructions in a function?
Hello,
I am trying to count IR instructions in a function for static analysis
using llvm pass. In contrast with existing examples, I am trying to include
instruction counts of all the callees of the function.
Counting the instructions of a function is easy using passes, but iterating
through the module's CallGraph is proving to be confusing. I believe I have
to use CallGraphWrapperPass to
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message -----
> From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Vaivaswatha Nagaraj" <vn at compilertree.com>
> Cc: "LLVM Dev" <llvm-dev at lists.llvm.org>
> Sent: Thursday, December 3, 2015 4:41:46 AM
> Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA
>
>