Displaying 20 results from an estimated 59 matches for "callgraphnode".
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 = it2->second=>getFunction();
cer...
2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
...rms/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) {}
virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) {
CallGraphNode *node = SCC.front();
Function *function = node->getFunction();
StringRef str = function->getName();
return false;
}
};
And when I run the pass with opt, I get:
0 libLLVM-2.7.dylib 0xe0b33d28
llvm::sys::RWMutexImp...
2013 Jun 05
0
[LLVMdev] CallGraph, GraphTraits and DominatorTree
...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 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&...
2016 Jan 20
2
Why getFunction() of CallGraphNode return NULL function?
...> (unless not de-virtualized).
>
>
>
> Regards,
>
> Ashutosh
>
>
>
> *From:* Qiuping Yi [mailto:yiqiuping at gmail.com]
> *Sent:* Wednesday, January 20, 2016 9:10 AM
> *To:* Nema, Ashutosh
> *Cc:* llvm-dev
> *Subject:* Re: [llvm-dev] 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
&...
2010 Nov 01
2
[LLVMdev] Identify recursion in a call graph
...re your pass to be a
> CallGraphSCCPass in which case it will work one strongly connected
> component at a time.
Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible,
so I'll use llvm::scc_iterator. Here's what I have so far:
bool MyModulePass::isRecursive() {
CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
scc_end(rootNode); SCCI != E; ++SCCI) {
const std::vector<CallGraphNode*> &nextSCC = *SCCI;
if (nextSCC.size() == 1 && SCCI.hasLoop()) {
return t...
2016 Jan 20
2
Why getFunction() of CallGraphNode return NULL function?
...gt;
>
> Regards,
>
> Ashutosh
>
>
>
> *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf Of *Qiuping
> Yi via llvm-dev
> *Sent:* Tuesday, January 19, 2016 5:35 PM
> *To:* llvm-dev at lists.llvm.org
> *Subject:* [llvm-dev] 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->e...
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!
>>
2006 Sep 18
2
[LLVMdev] llvm-g++: Internal error
...-gcc, compiled and built
them on my machine successfully.
i tried a c-language hello program, it was OK.
But when i tried a c++-language hello program, i got:
~/project/llvm/examples$ llvm-g++ t3.cc -o t3
gccld:
/developer/zsth/project/llvm/src/llvm/lib/Analysis/IPA/CallGraph.cpp:277:
void llvm::CallGraphNode::removeCallEdgeTo(llvm::CallGraphNode*): Assertion
`i && "Cannot find callee to remove!"' failed.
gccld((anonymous namespace)::PrintStackTrace()+0x1a)[0x84eb812]
gccld((anonymous namespace)::SignalHandler(int)+0x110)[0x84ebb3a]
[0xffffe420]
/lib/libc.so.6(abort+0x103)[0x9226e3...
2011 Oct 19
1
[LLVMdev] CallGraphSCCPass
I'm building a SCCPass below, it appears that the CallGraphNode->getFunction
returns a valid function but seg faults on call like "getName" or "size" but
not on calls like "empty" (which returns false).
My understanding is that the heirarchy is:
CallGraphSCC->CallGraphNode->Function->BasicBlock->Instruction, is this...
2006 Sep 14
1
[LLVMdev] use LLVM to convert C++ code to C code
...to be used
for c-code generation)<br>
<br>
#include <vector><br>
using namespace std;<br>
<br>
int main()<br>
{<br>
vector<int> v;<br>
}<br>
<br>
$ llvm-g++ test.cpp<br>
<br>
gccld: CallGraph.cpp:277: void
llvm::CallGraphNode::removeCallEdgeTo(llvm::CallGraphNode*): Assertion
`i && "Cannot find callee to remove!"' failed.<br>
gccld((anonymous namespace)::PrintStackTrace()+0x18)[0x84833b4]<br>
gccld((anonymous namespace)::SignalHandler(int)+0x100)[0x848363c]<br>
/lib/tls/libc.so.6[...
2010 Nov 02
2
[LLVMdev] Identify recursion in a call graph
...uncan Sands <baldrick at free.fr> wrote:
> Hi Trevor,
>
> > Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so
> I'll
> > use llvm::scc_iterator. Here's what I have so far:
> >
> > bool MyModulePass::isRecursive() {
> > CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
> > for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
> > scc_end(rootNode); SCCI != E; ++SCCI) {
> > const std::vector<CallGraphNode*> &nextSCC = *SCCI;
> > if (nextSCC.size() == 1 &&a...
2010 Jul 19
0
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
Hi Trevor,
> struct Hello : public CallGraphSCCPass {
> static char ID; // Pass identification, replacement for typeid
> Hello() : CallGraphSCCPass(&ID) {}
> virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) {
> CallGraphNode *node = SCC.front();
> Function *function = node->getFunction();
> StringRef str = function->getName();
maybe function is NULL? This is the case for the "external node".
Ciao,
Duncan.
> retur...
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
Hi Trevor,
> Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so I'll
> use llvm::scc_iterator. Here's what I have so far:
>
> bool MyModulePass::isRecursive() {
> CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
> for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
> scc_end(rootNode); SCCI != E; ++SCCI) {
> const std::vector<CallGraphNode*> &nextSCC = *SCCI;
> if (nextSCC.size() == 1 && SCCI.hasLoop())...
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 CallGraphSCCPass and handle function pointer
types in the call graph by myself?
For example,
int aa(i...
2011 Mar 30
1
[LLVMdev] Trouble traversing the CallGraph
...:
-----
#include <stdio.h>
int main() {
printf( "Hello World!\n" );
}
-----
If I try to traverse the CallGraph using the following code:
-----
CallGraph CG = this->getAnalysis<CallGraph>();
for( CallGraph::const_iterator i = CG.begin(); i != CG.end(); ++i ) {
CallGraphNode * cgn = i->second;
for( CallGraphNode::const_iterator ii = cgn->begin();
ii != cgn->end(); ++ii ) {}
}
-----
The CallGraphNode::const_iterator is inconsistent. For starters, the inner loop never exits and, besides, if I
try to use the values contained in the iterator (e.g. ii->se...
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...
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
...gt; wrote:
>
>> Hi Trevor,
>>
>> > Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so
>> I'll
>> > use llvm::scc_iterator. Here's what I have so far:
>> >
>> > bool MyModulePass::isRecursive() {
>> > CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
>> > for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
>> > scc_end(rootNode); SCCI != E; ++SCCI) {
>> > const std::vector<CallGraphNode*> &nextSCC = *SCCI;
>> > if (nextSCC.siz...
2010 Oct 06
2
[LLVMdev] Segmentation Fault of BasicCallGraph?
...tcgn and the information 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:...
2020 May 27
2
Attempt to use DomTreeBase on a CallGraph or CallGraphNode
Hi,
Has anyone successfully been able to implement domination over a callgraph,
I'm getting stuck on supporting DomTreeBuilder for Calculate.
Many thanks
---
Marcel Achim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200527/36b77777/attachment.html>
-------------- next part --------------