Displaying 9 results from an estimated 9 matches for "addcalledfunct".
2010 Oct 06
2
[LLVMdev] Segmentation Fault of BasicCallGraph?
...formation of the pass. then after
enabling and run the new pass, on a test.bc file, there is always a
segmentation fault.
0 libLLVM-2.7.so.1 0x00007f5cd87b1d2f
1 libLLVM-2.7.so.1 0x00007f5cd87b238d
2 libpthread.so.0 0x00007f5cd7ba38f0
3 MyPass.so 0x00007f5cd6a538d4
llvm::CallGraphNode::addCalledFunction(llvm::CallSite,
llvm::CallGraphNode*) + 100
4 MyPass.so 0x00007f5cd6a519aa
5 MyPass.so 0x00007f5cd6a52dd1
6 libLLVM-2.7.so.1 0x00007f5cd8432e08
llvm::MPPassManager::runOnModule(llvm::Module&) + 376
7 libLLVM-2.7.so.1 0x00007f5cd8432f2b
llvm::PassManagerImpl::run(llvm::Modul...
2007 Jul 12
2
[LLVMdev] BasicCallGraph patch
...----------------------------------------===//
#include "llvm/Analysis/CallGraph.h"
+#include "llvm/Constants.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/Support/CallSite.h"
@@ -150,6 +151,19 @@
->addCalledFunction(CS, Node);
else
isUsedExternally = true;
+ } else if (ConstantExpr* CE = dyn_cast<ConstantExpr>(*I)) {
+ for (Value::use_iterator I = CE->use_begin(), E = CE->use_end();
+ I != E; ++I)
+ if (Instruction* Inst = dyn_cast<Instruct...
2010 Oct 07
0
[LLVMdev] Segmentation Fault of BasicCallGraph?
...enabling and run the new pass, on a test.bc file, there is always a
> segmentation fault.
>
> 0 libLLVM-2.7.so.1 0x00007f5cd87b1d2f
> 1 libLLVM-2.7.so.1 0x00007f5cd87b238d
> 2 libpthread.so.0 0x00007f5cd7ba38f0
> 3 MyPass.so 0x00007f5cd6a538d4
> llvm::CallGraphNode::addCalledFunction(llvm::CallSite,
> llvm::CallGraphNode*) + 100
> 4 MyPass.so 0x00007f5cd6a519aa
> 5 MyPass.so 0x00007f5cd6a52dd1
> 6 libLLVM-2.7.so.1 0x00007f5cd8432e08
> llvm::MPPassManager::runOnModule(llvm::Module&) + 376
> 7 libLLVM-2.7.so.1 0x00007f5cd8432f2b
> llv...
2007 Jul 17
0
[LLVMdev] BasicCallGraph patch
...=//
>
>
> #include "llvm/Analysis/CallGraph.h"
> +#include "llvm/Constants.h"
> # include "llvm/Module.h"
> # include "llvm/Instructions.h"
> # include "llvm/Support/CallSite.h"
> @@ -150,6 +151,19 @@
> -> addCalledFunction(CS, Node);
> else
> isUsedExternally = true;
> + } else if (ConstantExpr* CE = dyn_cast<ConstantExpr>(*I)) {
> + for (Value::use_iterator I = CE->use_begin(), E = CE->use_end();
> + I != E; ++I)
> + if (Instruction*...
2007 Jul 17
2
[LLVMdev] BasicCallGraph patch
...uot;llvm/Analysis/CallGraph.h"
> > +#include "llvm/Constants.h"
> > # include "llvm/Module.h"
> > # include "llvm/Instructions.h"
> > # include "llvm/Support/CallSite.h"
> > @@ -150,6 +151,19 @@
> > -> addCalledFunction(CS, Node);
> > else
> > isUsedExternally = true;
> > + } else if (ConstantExpr* CE = dyn_cast<ConstantExpr>(*I)) {
> > + for (Value::use_iterator I = CE->use_begin(), E =
> CE->use_end();
> > + I != E; ++I)
&g...
2007 Jul 17
0
[LLVMdev] BasicCallGraph patch
...s/CallGraph.h"
>> > +#include "llvm/Constants.h"
>> > # include "llvm/Module.h"
>> > # include "llvm/Instructions.h"
>> > # include "llvm/Support/CallSite.h"
>> > @@ -150,6 +151,19 @@
>> > -> addCalledFunction(CS, Node);
>> > else
>> > isUsedExternally = true;
>> > + } else if (ConstantExpr* CE = dyn_cast<ConstantExpr>(*I)) {
>> > + for (Value::use_iterator I = CE->use_begin(), E =
>> CE->use_end();
>> >...
2011 Mar 29
2
[LLVMdev] Anomaly with CallGraph construction
...>begin(), BBE = F->end(); BB != BBE; ++BB)
for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) {
CallSite CS(cast<Value>(II));
if (CS && !isa<DbgInfoIntrinsic>(II)) {
const Function *Callee = CS.getCalledFunction();
if (Callee)
Node->addCalledFunction(CS, getOrInsertFunction(Callee));
else
Node->addCalledFunction(CS, CallsExternalNode);
}
}
------
While analyzing the IS NAS Parallel Benchmark I find the following BasicBlock:
; <label>:24 ; preds = %20
%25 = call double (...)* bitcast (double (double*, double*)* @randlc to d...
2006 May 22
2
[LLVMdev] Indirect function call
...Structures::callee_iterator K = DS.callee_begin(J); K !=
DS.callee_end(J); ++K) {
if(K->first != J) continue;
CallGraphNode *cgn = getAnalysis<CallGraph>()[f]; // Find a indirect call!
CallGraphNode *calleecgn = getAnalysis<CallGraph>()[K->second];
cgn->addCalledFunction(calleecgn);
std::cerr<<"\n indirect call in "<<f->getName()<<*J<<", callee:
"<<K->second->getName();
}
}
}
}
}
}
But my code does not always works: if the arguments are not pointer,
CompleteBUDataStructures not reco...
2019 Dec 26
2
[RFC] Coroutines passes in the new pass manager
...new functions, which it adds to the call graph using
> 'CallGraph::getOrInsertFunction'. For each of the new nodes, and for
> the node representing the original function, the coro-split pass
> iterates over each of the instructions in the function, and uses
> 'CallGraphNode::addCalledFunction' to add edges to the call graph.
>
> The difficulty I'm having here in porting coro-split to the new pass
> manager is that its SCC passes use 'LazyCallGraph' and
> 'LazyCallGraph::SCC'. These classes' documentation explains that they
> are designed wit...