Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] applying a pass only on execution paths"
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
2013 Feb 27
3
[LLVMdev] llvm get annotations
Hello everyone !
I followed
http://stackoverflow.com/questions/4976298/modern-equivalent-of-llvm-annotationmanagerin
order to get annotations from my target bytecode. All the examples
that
I give in the following is related to the code from that link. I have
`__attribute__((annotate("DS"))) int f=0;` into the target C++ program and
the related IR code:
@.str = private unnamed_addr
2013 Jun 25
4
[LLVMdev] get value
Hi Cristianno,
Thank you, it works :)
with an extra cast:
Value *v ......
ConstantInt* RR = (ConstantInt *)v;
uint64_t VV = (RR->getValue()).getLimitedValue();
errs()<<"\nRR "<<VV<<"\n";
2013 Apr 26
2
[LLVMdev] CallGraph
Thanks for the response.
I looked and I cannot see what exactly I need. I saw getCalledFunction() so
I need CallSite CS(cast<Value>(II)) where II is a basic block iterator, so
an instruction. It seems not easier than the "unelegant" version....if I am
still at the Instruction level...
I need a method that takes from a "leaf" basic block from a function (Maybe
there is
2009 May 10
0
[LLVMdev] Get the call graph SCCs from a function pass
On 2009-05-10 21:18, Nick Johnson wrote:
> On 5/10/09, Török Edwin <edwintorok at gmail.com> 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
>> >
2013 Jun 25
0
[LLVMdev] get value
Oops, that's true: I forgot about that XD sorry =)
Glad I could help,
--
Cristianno Martins
PhD Student of Computer Science
University of Campinas
cmartins at ic.unicamp.br
<cristiannomartins at hotmail.com>
On Tue, Jun 25, 2013 at 4:38 AM, Alexandru Ionut Diaconescu <
cyrusthevirus001x at yahoo.com> wrote:
> Hi Cristianno,
>
> Thank you, it works :)
>
> with
2013 Jun 26
0
[LLVMdev] get value
Alexandru Ionut Diaconescu wrote:
> Hi Cristianno,
>
> Thank you, it works :)
>
> with an extra cast:
> Value *v ......
> ConstantInt* RR = (ConstantInt *)v;
Please use "cast<ConstantInt>(v)" instead. See
http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates
.
Nick
> uint64_t VV = (RR->getValue()).getLimitedValue();
>
2013 Apr 26
0
[LLVMdev] CallGraph
Hi,
On 26/04/13 11:19, Alexandru Ionut Diaconescu wrote:
> Hello,
>
> I try to make a big CFG (control flow graph) by combining all the CFG-s from all
> the functions of a module. I still have one problem : I want to get the links
> between functions.
>
> For CFG-s, I used CallGraphNode->second->getFunction, then Function_iterators
> and succ_iterators, so I have all
2009 May 10
2
[LLVMdev] Get the call graph SCCs from a function pass
On 5/10/09, Török Edwin <edwintorok at gmail.com> 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
2013 Jun 26
2
[LLVMdev] vmkit variables internal representation
Yes ! Thank you a lot :)
It seems vmkit bytecode is quite close to the classic LLVM, but still adaptations to the passes have to be done
________________________________
From: Tim Northover <t.p.northover at gmail.com>
To: Alexandru Ionut Diaconescu <cyrusthevirus001x at yahoo.com>
Cc: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu>
Sent: Wednesday, June 26,
2006 Sep 29
0
[LLVMdev] FunctionPass requiring SCCs
Hi Ryan,
On 9/29/06, Ryan M. Lefever <lefever at crhc.uiuc.edu> wrote:
> I have a FunctionPass F that needs a list of all the SCCs for use in its
> doFinalization() method. Let's say I write a CallGraphSCCPass C that
> creates an array of all SCCs. Let C be required by F, and let F call
> getAnalysis<C>() from its doFinalization() method. Am I guaranteed that
>
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
2013 Jun 26
0
[LLVMdev] vmkit variables internal representation
Hi Alexandru,
The Java bytecode does not give and use the name of the local variables. We
can find them in an attribute used for debugging, but currently, vmkit do
not use this attribute. It means that the llvm bitcode that vmjc emit does
not contain these names. Finding local variables names could be useful, but
we don't plane to implement this feature for the moment... If you are
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
2009 May 10
0
[LLVMdev] Get the call graph SCCs from a function pass
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?
But I'm not sure if using a FunctionPass to access Callgraph data is a
good
2013 Dec 02
2
[LLVMdev] Segmentation fault when traverse call graph
Dear everyone,
I want to traverse call graph, but I have some trouble .
In my pass MyPass which need to traverse call graph, I firstly added the
CallGraph analysis to the pass requirements by
*AU.addRequired<CallGraph>();*
My pass MyPass then will be added to a pass manager by
*manager.add(new MyPass());*
and then I want to traverse the call graph such as:
CallGraph CG =
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;
2008 Oct 08
0
[LLVMdev] Error while making new pass
Hi Kapil,
On Oct 8, 2008, at 10:19 AM, kapil anand wrote:
> 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
>
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";
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