Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] callgraph utility with opt"
2009 Mar 02
1
[LLVMdev] LLVMdev Digest, Vol 53, Issue 72
Hello All,
I am currently working on a project which requires me to generate a .bc file
for given .c file and open the .bc file to identify various functions and
the caller callee relationship amongst them. The end goal is to generate a
type of callgraph for all the functions present in the original C code. I am
quite new to llvm and will really appreciate if I can be provided some
pointers. I am
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 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
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 Dec 02
2
[LLVMdev] Segmentation fault when traverse call graph
Dear everyone,
I want to traverse call graph, but I have some trouble .
In my pass MyPass which need to traverse call graph, I firstly added the
CallGraph analysis to the pass requirements by
*AU.addRequired<CallGraph>();*
My pass MyPass then will be added to a pass manager by
*manager.add(new MyPass());*
and then I want to traverse the call graph such as:
CallGraph CG =
2013 Dec 03
0
[LLVMdev] Segmentation fault when traverse call graph
I recall having a similar problem while coding my own special-purpose
"opt". My guess: try adding the following lines before your pass is
inserted into the PassManager:
PassRegistry &Registry = *PassRegistry::getPassRegistry();
initializeIPA(Registry);
You might require other library initializations. Have a look at the
"opt" source code.
On 02/12/13 10:36,
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 =
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
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 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,
>
2006 Sep 30
0
[LLVMdev] FunctionPass requiring SCCs
On Fri, 29 Sep 2006, Vikram Adve wrote:
> On Sep 29, 2006, at 2:05 PM, Domagoj Babic wrote:
>> Check out scc_* iterators. Also note that the call graph
>> is not aware of the indirect calls, so you will need to write your
>> own CG implementation if you need to handle function pointers
>> soundly.
> Chris, is this true? If so, it seems like a bad property for 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
2009 Mar 20
2
[LLVMdev] Problem with MemoryDependenceAnalysis
Devang Patel wrote:
> On Mar 20, 2009, at 8:13 AM, Amr Yehia wrote:
>
>
>> Dear all,
>>
>> I am having a problem adding a MemoryDependenceAnalysis pass to a
>> Module
>> Pass i created, it gives me the following error when i add
>> (Info.addRequired<MemoryDependenceAnalysis>();) it in the
>> getAnalysisUsage(AnalysisUsage &Info)
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";
2011 Mar 29
2
[LLVMdev] Anomaly with CallGraph construction
Hi all,
I have been trying to build a loop nesting analysis which works interprocedurally. In order
to find the functions called inside a given loop, I am traversing the Instructions into the
BasicBlock's that conform a Loop, and applying the code that CallGraph construction uses:
------ extract from CallGraph.cpp : 144
// Look for calls by this function.
for (Function::iterator BB =
2012 Oct 11
2
[LLVMdev] Function aliases in CallGraph
Hello, I have a simple program using aliases to functions, and it seems
that the CallGraph doesn't follow these aliases. Here is the example:
@alias = alias void ()* @realfunc
define void @realfunc() {
entry:
ret void
}
define i32 @main() {
entry:
call void @alias()
ret i32 0
}
******* Output of the CallGraph *******
Call graph node <<null
2018 May 07
0
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
I'm not sure about the old pass manager, but I think the new pass
manager solves this issue. See
llvm::updateCGAndAnalysisManagerForFunctionPass where it updates the
call graph to be in sync with edges deleted by function passes. So I
suspect the right fix is to use the new pass manager.
-- Sanjoy
On Mon, May 7, 2018 at 7:32 AM, Björn Pettersson A via llvm-dev
<llvm-dev at
2009 Mar 24
2
[LLVMdev] Problem with MemoryDependenceAnalysis
no .. i am calling a function pass from a module pass, adding other
function passes to my module pass works, but when i try to add
MemoryDependenceAnalysis it gives error
I want to report a bug but i don't know if this is a real bug or i am
doing something wrong, knowing that i am adding other function passe to
my module pass and it works fine.
the error i get:
adding callgraph pass ...