similar to: [LLVMdev] Problem of use CallGraph

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Problem of use CallGraph"

2012 Aug 17
0
[LLVMdev] Problem of use CallGraph
On Fri, Aug 17, 2012 at 4:23 PM, Jianfei Hu <hujianfei258 at gmail.com> wrote: > Hello, > I want to traverse CallGraph > > code segment: > > > virtual void getAnalysisUsage(AnalysisUsage &AU) const > { > AU.addRequired<CallGraph>(); > } > > virtual
2012 Nov 28
1
[LLVMdev] Inconsistent result with CallGraph
Hello: We are working with LLVM-3.1 and we have a problem.This is the code we have executed: virtual void getAnalysisUsage( llvm::AnalysisUsage & info ) const { info.addRequired<CallGraph>(); ... } ... virtual bool runOnModule( Module & M ) { ... CallGraph &CG = this->getAnalysis<CallGraph>(); CallGraphNode *cgn; unsigned nref;
2011 Mar 30
1
[LLVMdev] Trouble traversing the CallGraph
I am finding some weird behavior in the CallGraph, and am not sure what am I doing wrong. When trying to traverse nodes in the CallGraph I get stuck in nodes representing external functions. Take the following code: ----- #include <stdio.h> int main() { printf( "Hello World!\n" ); } ----- If I try to traverse the CallGraph using the following code: ----- CallGraph CG
2012 Apr 22
0
[LLVMdev] Remove function from module
Михаил wrote: > It is ModulePass with AnalysisUsage of CallGraph Ah, then you'll need to update the CallGraph first. Use "CG.removeFunctionFromModule(F);" before deleting it. Nick > Yours sincerely, > Kadysev Mikhail > > 22.04.2012, в 5:20, Nick Lewycky написал(а): > >> Михаил wrote: >>> Thanks, but I replaceAllUsesWith() - works well, but I still
2012 Apr 22
2
[LLVMdev] Remove function from module
It is ModulePass with AnalysisUsage of CallGraph Yours sincerely, Kadysev Mikhail 22.04.2012, в 5:20, Nick Lewycky написал(а): > Михаил wrote: >> Thanks, but I replaceAllUsesWith() - works well, but I still get bug in >> eraseFromParent(): >> >> While deleting: i32 (%class.B*, i32)* %_ZN1B1xEi >> An asserting value handle still pointed to this value! >>
2013 Apr 26
2
[LLVMdev] CallGraph
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
2015 Dec 08
3
Get root node of CallGraph
Hi, There is a "Root" private member in CallGraph <http://llvm.org/docs/doxygen/html/CallGraph_8h_source.html#l00192> class. But there is no way to get access to that member. How can I do that? I can get CallGraphNode of "main" method. But I am curious is there more cleaner way. Thanks, Riyad -------------- next part -------------- An HTML attachment was scrubbed...
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
2016 Jan 19
2
Why getFunction() of CallGraphNode return NULL function?
Hi all, I want to find all the called functions in each function, thus I iterate the calledFunctions of each CallGraphNode in CallGraph as follow: for (CallGraph::iterator it = CG->begin(); it != CG->end(); ++it) { CallGraphNode* node = it->second; for (CallGraphNode::iterator it2 = node->begin(); it2 != node->end(); ++it2) { Function* calledFunc =
2013 Apr 26
0
[LLVMdev] CallGraph
Hi, On 26/04/13 11:19, Alexandru Ionut Diaconescu wrote: > 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
2016 Jan 20
2
Why getFunction() of CallGraphNode return NULL function?
Dear Ashutosh, Thank you, I can handle some indirect callSites by getFunction() of InvokInst and CallInst. However, when I am handling C++ programs, I found the calls of member functions are converted to some strange indirect calls. For example: table->truncate(sysTransaction); // from mysql are translated to the next complex llvm IR: _ZN8Database20getSystemTransactionEv.exit: ;
2016 Jan 20
2
Why getFunction() of CallGraphNode return NULL function?
So, I won't know the called function statically, Right? -------------------------------------------- Qiuping Yi Institute Of Software Chinese Academy of Sciences On Wed, Jan 20, 2016 at 2:24 PM, Nema, Ashutosh <Ashutosh.Nema at amd.com> wrote: > Typically for C++ virtual function you will see an indirect callSite > (unless not de-virtualized). > > > > Regards, >
2013 Apr 26
2
[LLVMdev] CallGraph
Thanks for the response. I looked and I cannot see what exactly I need. I saw getCalledFunction() so I need CallSite CS(cast<Value>(II)) where II is a basic block iterator, so an instruction. It seems not easier than the "unelegant" version....if I am still at the Instruction level... I need a method that takes from a "leaf" basic block from a function (Maybe there is
2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
Hi, I'm trying to use CallGraphSCCPass, but I keep getting a bus error. I can reproduce the problem quite easily using the lib/Transforms/Hello example. I simply mix in these changes: #include "llvm/CallGraphSCCPass.h" ... struct Hello : public CallGraphSCCPass { static char ID; // Pass identification, replacement for typeid Hello() : CallGraphSCCPass(&ID) {}
2011 Oct 19
1
[LLVMdev] CallGraphSCC
Hello, I want to access the instructions via: CallGraph->CallGraphNode->Function->BB->Instruction Is this possible? Right now, I'm iterating over the CallGraph Nodes via CallGraphSCC:iterator, but then I have to cast that iterator to a CallGraphNode const and then when I call CallGraphNode->getFunction, it returns a valid function but seg faults on function->getName()?
2013 Apr 26
0
[LLVMdev] CallGraph
Hi, On 26/04/13 13:17, Alexandru Ionut Diaconescu wrote: > Thanks for the response. > I looked and I cannot see what exactly I need. I saw getCalledFunction() so I > need CallSite CS(cast<Value>(II)) where II is a basic block iterator, so an > instruction. It seems not easier than the "unelegant" version....if I am still > at the Instruction level... the call graph
2015 Feb 27
2
[LLVMdev] Walking thru CallGraph bottom up
Hi Simon, > From: Simone Atzeni <simone.at at gmail.com> > To: John Criswell <jtcriswel at gmail.com> > Cc: llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Walking thru CallGraph bottom up > Message-ID: <318EBA41-2040-4EFE-B330-5813C817C2A2 at gmail.com> > Content-Type: text/plain; charset="windows-1252" > > I think I got it and the example is
2012 Aug 25
2
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
2012/8/25 Iaroslav Markov <ymarkov at cs.stonybrook.edu>: > Can't you do it by performing some analysis on CFG? You can traverse that structure with BFS. And after that for all the BB you have visited more than once, you try to find a parent that has a branch instruction as a terminator. Additionally you ensure that there are no BB with branches as terminators on your way. If such
2012 Aug 25
6
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hello All, I want to dertermine whether a basicblock is in a conditional branch. such as, //============================= if a > 2 // BasicBlock A then BasicBlock B endif BasicBlock C //============================= What I want to identify is BasicBlock B, which is in a condtional block. but C is not. In other words, I want to distinguish BasicBlocks that * must * be executed and that
2015 Feb 27
0
[LLVMdev] Walking thru CallGraph bottom up
Dear Simon, Kevin is correct; as far as I can tell, there is no method of getting the functions calling a given function. Instead, you have to start at the main() function and search for the function using a depth-first or breadth-first search. What may make sense is to build a new data structure that has nodes that point from callees to callers once and then use that for your queries.