Displaying 20 results from an estimated 491 matches for "callgraphs".
Did you mean:
callgraph
2002 Dec 06
3
[LLVMdev] Tarjan+function_ptrs == trouble ? (fwd)
Test Cases:
(attached)
Iteration code:
(...)
typedef TarjanSCC_iterator<CallGraph*> MyTarjan;
CallGraph& callGraph = getAnalysis<CallGraph>();
MyTarjan iter = tarj_begin(&callGraph);
MyTarjan end = tarj_end(&callGraph);
while(iter!=end)
iter++;
(...)
if you take the time to print out the function each non-looping node iter
traverses, it never reaches main...
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 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
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";
2002 Dec 06
1
[LLVMdev] Tarjan+function_ptrs == trouble ?
Thanks,
I've been through the documentation, and if I visit main, i think
everything will turn out correctly... Printing out the Call graph reveals
that main is calling this external node i think you are making reference
to. Could this be the problem?
Dave
On Fri, 6 Dec 2002, Chris Lattner wrote:
> > if you take the time to print out the function each non-looping node iter
>
2009 May 10
2
[LLVMdev] Get the call graph SCCs from a function pass
...; wrote:
> On 2009-05-10 20:11, Nick Johnson wrote:
> > Hello,
> >
> > I'm writing a Function Pass. This function pass needs access to the
> > CallGraph and CallGraph SCCs. Is there any way I can get CallGraph
> > information without changing my pass to a CallGraphSCCPass ?
>
>
> Does getAnalysis<CallGraph>() work?
>
AFAIK, it's not a pass.
> But I'm not sure if using a FunctionPass to access Callgraph data is a
> good idea, transformations can
> change it (for example dead code elimination can remove edges).
>
I'm...
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
2018 May 07
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
If I run:
opt -globals-aa -die -inline -debug-pass=Details foo.ll -S
then I will get this pass structure:
Target Library Information
Target Transform Information
Target Pass Configuration
Assumption Cache Tracker
Profile summary info
ModulePass Manager
CallGraph Construction
Globals Alias Analysis
FunctionPass Manager
BasicBlockPass Manager
Dead Instruction
2008 Oct 08
2
[LLVMdev] Error while making new pass
Hi Devang,
GlobalModRefPass is also a ModulePass and it uses CallGraph Analysis.
So, I think it should not necessary to extend CallGraphSCCPass to use
CallGraph information. Module Pass shoule be sufficient...
--Kapil
On 10/8/08, Devang Patel <dpatel at apple.com> wrote:
> Hi Kapil,
>
> On Oct 8, 2008, at 10:19 AM, kapil anand wrote:
>
>> Hi all,
>>
>> I need a new kind of analysis on LLVM Modul...
2013 Jun 05
0
[LLVMdev] CallGraph, GraphTraits and DominatorTree
...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 work with graphs in LLVM should work with CallGraphs, right?
Well, it doesn't; at least, not for the combination CallGraph &
DominatorTree. Besides the fact that there is no implementation of inverse
GraphTraits accesses for this graph (I don't mind at all about it -- I just
wanted access the nodes on their standard order), I'm getti...
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
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;
2009 Feb 13
0
[LLVMdev] loop passes vs call graph
...e callgraph. Then the pass manager
should do:
run -inline on G
run -fpass on G
run -inline on F
run -fpass on F
run -loop-unswitch on G
run -loop-unswitch on F.
Just my opinion of course.
Ciao,
Duncan.
> So are loop passed *required* to preserved the call graph, in the same
> way that CallGraphSCC passes are?
>
> Or should the pass manager take care of rebuilding the call graph
> before calling the inliner on an SCC whose functions have been
> changed? I don't see any evidence of this happening.
>
>
> I've attached the full output from -debug-pass=Executions...
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
2009 May 10
2
[LLVMdev] Get the call graph SCCs from a function pass
Hello,
I'm writing a Function Pass. This function pass needs access to the
CallGraph and CallGraph SCCs. Is there any way I can get CallGraph
information without changing my pass to a CallGraphSCCPass ?
Thanks,
--
Nick Johnson
2018 May 08
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
Well, do you have a patch that enables the new pass manager that we can land then?
To be more serious:
1) I don't even know how to run those passes using the new pass manager even if it where enabled by default. I guess that I'm supposed to use -passes. Is there a syntax description for that option somewhere? How do I for example run -die?
2) "Use the new pass manager" does
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 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 =
2008 Oct 08
2
[LLVMdev] Error while making new pass
Hi all,
I need a new kind of analysis on LLVM Module, so I made a new pass to do
this. This new pass extends the ModulePass class and follows the conventions
used in GlobalModRefPass, which is also a Module Pass.I need the CallGraph
analysis for this pass, hence I have added (addRequired(CallGraph)) in
getAnalysisUsage function of this new pass. I also added it to CallGraph
Analysis group through