search for: callgraphwrapperpass

Displaying 8 results from an estimated 8 matches for "callgraphwrapperpass".

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 *c...
2017 Nov 29
2
How to count instructions in a function?
...ysis 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 get both module pass and its CallGraph. How do I iterate through the CallGraph in runOnModule()? A simple print callee names example would be highly appreciated. Thanks, Zubin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llv...
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 bene...
2015 Jun 08
2
[LLVMdev] Use Callgraph
Hi All, I tried to use CallGraph in llvm by adding "AU.addRequired<CallGraph>();" in getAnalysisUsage function. But it reports an error: include/llvm/PassAnalysisSupport.h:56:39: error: ‘ID’ is not a member of ‘llvm::CallGraph’ return addRequiredID(PassClass::ID); How to use it correctly? Thanks, Haopeng
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
...two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example. I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process functions in order, and the situation isn't a whole lot better. Interestingly, `addRequired<CallGraphWrapperPass>()` failed on me, even though at first glance, CGPassManager doesn't seem to be doing anything that I'm not doing. This is relatively easily bypassed by creating the CallGraph from runOnModule. `addRequired<MemoryDependenceAnalysis>()` fails with this error message: > Pass ...
2015 Jun 17
2
[LLVMdev] metadata in callgraph
Hi All, It seems that functions in callgraph remove all metadata info, such as dbg. Can I keep metadata in callgraph? Best, Haopeng
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John. Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.) Félix > Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit : > > On 5/18/15 10:45 PM, Félix Cloutier
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 > >