Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] Function::getName in CallGraphSCCPass causes bus error"
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 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
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
The following code is causing an "UNREACHABLE executed!" and a stack dump,
any ideas?
namespace {
struct myPass : public CallGraphSCCPass {
static char ID;
myPass() : CallGraphSCCPass(ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequired<LoopInfo>();
}
virtual bool runOnSCC(CallGraphSCC &SCC)
2006 Sep 18
2
[LLVMdev] llvm-g++: Internal error
Hi,
i used CVS to checkout the source of llvm and llvm-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
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
2011 Nov 30
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
On Tue, Nov 29, 2011 at 6:59 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> The following code is causing an "UNREACHABLE executed!" and a stack dump,
> any ideas?
The stack might be handy.
> namespace {
> struct myPass : public CallGraphSCCPass {
> static char ID;
> myPass() : CallGraphSCCPass(ID) {}
> virtual void getAnalysisUsage(AnalysisUsage
2011 Dec 01
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
In addition to the link below, please check for functions like "llvm.debug.declare", "llvm.debug.value", as you will not get LoopInfo for these.
Pankaj
________________________________
From: Devang Patel <dpatel at apple.com>
To: Ryan Taylor <ryta1203 at gmail.com>
Cc: llvmdev at cs.uiuc.edu
Sent: Wednesday, November 30, 2011 11:08 PM
Subject: Re: [LLVMdev]
2011 Nov 21
5
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
I would have thought this would have been possible.
On Thu, Nov 17, 2011 at 3:49 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> So is this simply not possible?
>
>
> On Thu, Nov 17, 2011 at 10:31 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
>> Nick,
>>
>> Thanks for this info, though this didn't help my problem at all.
>>
>>
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
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
UNREACHABLE executed!
0 opt 0x00000000008edc2f
1 opt 0x00000000008edfda
2 libpthread.so.0 0x00007f9c8e69bc60
3 libc.so.6 0x00007f9c8d986d05 gsignal + 53
4 libc.so.6 0x00007f9c8d98aab6 abort + 390
5 opt 0x00000000008da974 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 356
6 opt 0x000000000087e046
7 opt
2011 Dec 01
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
Thanks for the info. Curious, do you know if there is an opt that will put
all loops, including nested ones, in functions (ie each loop in it's own
function)? What I'm trying to do is create a way for each loop to have only
one exit. I want all loops to be single exit loops?
I can write my own pass but I'd rather not. I think that if I can put
each loop into it's own function
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
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
>
2010 Mar 26
0
[LLVMdev] [PATCH] Before/After IR Dumps
On Mar 17, 2010, at 11:25 AM, David Greene wrote:
> On Monday 15 March 2010 13:45:14 David Greene wrote:
>> On Sunday 14 March 2010 18:32:35 Chris Lattner wrote:
>>> This is much better than the first iteration but still has many issues.
>
> I believe I've addressed all your points with this patch except I didn't use
> StringRef. It doesn't appear to be
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 Jun 09
1
[LLVMdev] Segmentation fault 'cause of accessing function arguments
Hi all,
I am experimenting to run a pass inherited from CallGraphSCCPass. In
the pass, I iterate all functions in a SCC. In each iteration, I
access all arguments of a function in the following way:
Function::arg_iterator PI = fun->arg_begin(), PE = fun->arg_end();
...
I have no trouble with building. However, I am troubled with
"segmentation fault" when I run the pass
2010 Mar 17
4
[LLVMdev] [PATCH] Before/After IR Dumps
On Monday 15 March 2010 13:45:14 David Greene wrote:
> On Sunday 14 March 2010 18:32:35 Chris Lattner wrote:
> > This is much better than the first iteration but still has many issues.
I believe I've addressed all your points with this patch except I didn't use
StringRef. It doesn't appear to be useful since createPrinterPass will
be sent a const std::string & and will
2011 Oct 25
1
[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass
Hi,
I am writing a CallGraphSCCPass that uses LoopInfo which is a FunctionPass.
However, doing so results in the following error.
****
Unable to schedule 'Natural Loop Information' required by '......'
****
Google led me to this page, where Devang Patel suggests implementing the
addLowerLevelRequiredPasses in CGPassManager in a manner similar to
MPPassManager.
2013 Sep 23
0
[LLVMdev] Cannot get Alias Analysis?
Hi,
I am trying to write my own command-line tool which would use alias
analysis in a CallGraphSCCPass.
Firstly, I inherit a class AnalysisDriver from CallGraphSCCPass.
Then, I implement my own runOnFunction method which tries to get alias
analysis from each function.
The code is shown as follows:
*class AnalysisDriver : public CallGraphSCCPass {*
* static char Pid;*
* PassManager