similar to: [LLVMdev] llvm-g++: Internal error

Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] llvm-g++: Internal error"

2006 Sep 14
1
[LLVMdev] use LLVM to convert C++ code to C code
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Hi,<br> I am newbie to llvm.<br> <br> I am unable to generate
2019 Jun 04
2
is this a bug in PruneEH?
I have the following C source: extern unsigned int donut; void f1(); void f2(); void f1() { unsigned int *magic = &donut; if (*magic != 286529877) { f2(); } } void f2() { /* Loop here forever if application is built with wrong version of ROM image */ while(1) { ; } } The -O2 level PruneEH pass uses SimplifyFunction() which contains this code: for
2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
Hi, I'm trying to use CallGraphSCCPass, but I keep getting a bus error. I can reproduce the problem quite easily using the lib/Transforms/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) {}
2010 Nov 01
2
[LLVMdev] Identify recursion in a call graph
On Oct 30, 2010, at 4:38 AM, Duncan Sands wrote: >> Is there any facility in LLVM to identify recursion in a call graph? ... > use the facilities in SCCIterator.h, or declare 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
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 not the case? virtual bool
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)
2010 Nov 02
2
[LLVMdev] Identify recursion in a call graph
Hi you basically need to find a cycles in the call graph. Do do this just search google for a graph algorithm, then make it for your problem. See http://en.wikipedia.org/wiki/Cycle_detection. Jeff Kunkel On Tue, Nov 2, 2010 at 4:27 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Trevor, > > > Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so >
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?
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, >
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: ;
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(); >
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
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 function->getName()?
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
Also, could you write this in a separate pass, and obtain the results from getAnalysis()? I think others would find it useful to discover if a Function may be called recursively. -Jeff Kunkel On Tue, Nov 2, 2010 at 2:38 PM, Jeff Kunkel <jdkunk3 at gmail.com> wrote: > Hi you basically need to find a cycles in the call graph. Do do this just > search google for a graph algorithm, then
2010 Oct 06
2
[LLVMdev] Segmentation Fault of BasicCallGraph?
Hi, I did a little experiment, basically to extract implemented CallGraph to be a "new" pass with different registered name, and run the "new" pass, but the result always gives out Segmentation Fault... I am probably missing sth? Implemented another new class, class BasicCallGraph2 : public ModulePass, public CallGraph { ..... ... } The inside code is exact same as
2010 Nov 03
2
[LLVMdev] Identify recursion in a call graph
On Nov 2, 2010, at 12:53 PM, Jeff Kunkel wrote: > Also, could you write this in a separate pass, and obtain the > results from getAnalysis()? I think others would find it useful to > discover if a Function may be called recursively. I've modified the code so that it correctly identifies both direct and indirect recursion. I'm now trying to package it up as a patch for the
2010 Oct 07
0
[LLVMdev] Segmentation Fault of BasicCallGraph?
Shuying Liang wrote: > Hi, > > I did a little experiment, basically to extract implemented CallGraph > to be a "new" pass with different registered name, and run the "new" > pass, but the result always gives out Segmentation Fault... I am > probably missing > sth? > > Implemented another new class, > class BasicCallGraph2 : public ModulePass,
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
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...
2010 Nov 05
3
[LLVMdev] Identify recursion in a call graph
On Nov 2, 2010, at 11:08 PM, Nick Lewycky wrote: > The unittests/ directory contains C++ unit tests for arbitrary C++ > APIs > that don't fit the dejagnu model of running opt or llc over .ll files. Thanks for the tip. Attached is a patch+testcase that adds CallGraphNode::isRecursive to LLVM. Could someone with commit access please review and apply? Thanks, Trevor