Displaying 20 results from an estimated 2000 matches similar to: "Attempt to use DomTreeBase on a CallGraph or CallGraphNode"
2013 Jun 05
0
[LLVMdev] CallGraph, GraphTraits and DominatorTree
Hi there,
I'm currently writing an analysis (for now) pass for LLVM that kind of need
some information from the CallGraph of the program. This info would be
extremely easy to get if I could build the DominatorTree information about
the CallGraph. I even checked out and saw the declarations of GraphTraits
templates for CallGraph and CallGraphNode, which might indicate that all
algorithms that
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 =
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,
>
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
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...
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 Aug 17
3
[LLVMdev] Problem of use CallGraph
Hello,
I want to traverse CallGraph
code segment:
virtual void getAnalysisUsage(AnalysisUsage &AU) const
{
AU.addRequired<CallGraph>();
}
virtual bool runOnModule(Module &F)
{
CallGraph &g = getAnalysis<CallGraph>();
for ( CallGraph::iterator i = g.begin(); i != g.end(); i++)
{
errs()<<"-----------------\n";
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
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;
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
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
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 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 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.
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
2015 Feb 25
0
[LLVMdev] Walking thru CallGraph bottom up
On 2/25/15 10:51 AM, Simone Atzeni wrote:
> Thanks John.
>
> I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
> do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
If you know the Instruction, you can get it's basic block using
Instruction::getParent(), and then get
2015 Feb 25
2
[LLVMdev] Walking thru CallGraph bottom up
Thanks John.
I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
or given the Module I have to call the CallGraph directly?
Is there an example out there? I can’t find anything.
Thanks.
Simone
> On Feb 24, 2015, at 13:29, John
2011 Jan 25
1
[LLVMdev] Can CallGraphSCCPass distinguish different function pointer types in CallGraphNode?
Dear folks,
I am trying to handle function pointers at call graph, and I found that
the CallGraphSCCPass makes function pointers as external node, which is
actually an empty CallGraphNode (NULL pointer)?
If I want to distinguish the function pointer types in the call graph
(and I also want the SCC order in CallGraphSCCPass), can I do that easily?
Or I have to inheritate the
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