search for: alexandruionutdiaconescu

Displaying 20 results from an estimated 75 matches for "alexandruionutdiaconescu".

2013 May 02
2
[LLVMdev] int to StringRed conversion
...quot;*) }; lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values)); So that you can take advantage of the type system of LLVM bitcode, and don't have to cast the integers from/to strings by yourself. Logan On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > The problem is that I want to pass only srsr which is an int. "marked" was > just an example :) > > Thanks you! > > > On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > >> I'm not familiar w...
2012 Dec 20
1
[LLVMdev] LLVM segmentation fault / need use Instruction instead of Instruction*
I solved by checking if(BB->size()>1) Thank you all for the help ! Now debugging the next segfault. On Thu, Dec 20, 2012 at 12:59 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > getPrevNode<http://llvm.org/docs/doxygen/html/classllvm_1_1ilist__node.html#a77b897207ef0a1ae95c404695aed9a4b>() > Get the previous node, or 0 for the list head. I don't see any method > like hasPrevNode. > It can be a weird problem because "cu...
2013 May 02
0
[LLVMdev] int to StringRed conversion
..._analysis_name"*, MDNode::get(C, values)); > > So that you can take advantage of the type system of LLVM bitcode, and > don't have to cast the integers from/to strings by yourself. > > Logan > > > On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> The problem is that I want to pass only srsr which is an int. "marked" >> was just an example :) >> >> Thanks you! >> >> >> On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: >...
2013 Jun 07
1
[LLVMdev] CFG of a function
...blocks, I need too to map the edges "the whole CFG of the function" Save the CFG of the function in another memory address and call it for example orgCFG and change the CFG by referencing to the orgCFG Thank you for help and patience On 6 June 2013 10:59, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > I don't use a function for do the mapping, it may be MapValue(). If it > does not work, alias an int identifier for each basic block. Be aware > because basic block cannot have the same name (getName) in the same > function, but they might have the same na...
2013 Jun 06
0
[LLVMdev] CFG of a function
...Rasha Omar <rasha.sala7 at gmail.com> wrote: > I think I understood that, but what I mean is what is the function > responsible to do mapping is it MapValue() in ValueMapper.h? > > Thanks for your help > > > > On 6 June 2013 09:54, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Map every basic block from the CFG to a set of integers. The successors >> from the CFG can be used to make the edges in your simplified graph. The >> pair (Callee,Caller) can link the CFG-s between them in a larger CFG-like. >> >> >&...
2013 Jun 06
3
[LLVMdev] CFG of a function
I think I understood that, but what I mean is what is the function responsible to do mapping is it MapValue() in ValueMapper.h? Thanks for your help On 6 June 2013 09:54, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Map every basic block from the CFG to a set of integers. The successors > from the CFG can be used to make the edges in your simplified graph. The > pair (Callee,Caller) can link the CFG-s between them in a larger CFG-like. > > > On Wed, Jun 5, 2013 at 1...
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?
2013 May 02
0
[LLVMdev] int to StringRed conversion
...; I'm not familiar with this, but maybe you can try: > > StringRef tst = ("marked" + Twine(srsr)).str(); > > It seems that you can't use integer as meta data kind name. > > Logan > > > On Thu, May 2, 2013 at 10:59 PM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Thank you for your help! >> >> Almost solved my problem. Now I don't have any compilation errors. I have >> only one segfault: >> >> opt: LLVMContext.cpp:147: unsigned int >> llvm::LLVMContext::getMDKindID(llvm::StringRef...
2013 Jun 05
2
[LLVMdev] CFG of a function
What do you mean by mapping to integers? On 5 June 2013 22:32, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Why you don't map the basic blocks to integers and apply algorithms on the > integer graph? And construct your new CFG. > > > On Wed, Jun 5, 2013 at 10:27 PM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > >> How could I keep the function...
2012 Dec 20
0
[LLVMdev] LLVM segmentation fault / need use Instruction instead of Instruction*
...e list head. I don't see any method like hasPrevNode. It can be a weird problem because "current->getPrevNode()" is indicating to "current" itself (the problem appears for the BB with only one element)? On Thu, Dec 20, 2012 at 12:42 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello, > > Thank you for your answer. If I want to use > > then I have > > error: ‘NodeTy* llvm::ilist_half_node<NodeTy>::getPrev() [with NodeTy = > llvm::Instruction]’ is protected > error: ‘llvm::ilist_half_node<llvm::Instruction>’...
2013 Feb 27
0
[LLVMdev] llvm get globals definition line number
...etadata !"r", metadata !"", metadata !841, i32 19, metadata !56, i32 0, i32 1, i32* @r} ; [ DW_TAG_variable ] [r] [line 19] [def] with on which `!0` is indirectly dependent and there is `!llvm.dbg.cu = !{!0}` . On Wed, Feb 27, 2013 at 11:35 AM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello, > > I followed the > http://stackoverflow.com/questions/13852180/how-to-get-variable-definition-line-number-etc-using-dbg-metadatain order to get the line number definition for local variables (allocas), > which works fine. But I need the same for gl...
2012 Dec 20
2
[LLVMdev] LLVM segmentation fault / need use Instruction instead of Instruction*
Hello, Thank you for your answer. If I want to use then I have error: ‘NodeTy* llvm::ilist_half_node<NodeTy>::getPrev() [with NodeTy = llvm::Instruction]’ is protected error: ‘llvm::ilist_half_node<llvm::Instruction>’ is not an accessible base of ‘llvm::Instruction’ Do you know any other method to access the previous instruction of a terminator instruction? PS: back() is not an
2013 Jun 06
0
[LLVMdev] CFG of a function
...lified graph. The pair (Callee,Caller) can link the CFG-s between them in a larger CFG-like. On Wed, Jun 5, 2013 at 11:03 PM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > What do you mean by mapping to integers? > > > On 5 June 2013 22:32, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Why you don't map the basic blocks to integers and apply algorithms on >> the integer graph? And construct your new CFG. >> >> >> On Wed, Jun 5, 2013 at 10:27 PM, Rasha Omar <rasha.sala7 at gmail.com>wrote: >> >>&gt...
2013 Feb 27
2
[LLVMdev] llvm get globals definition line number
Hello, I followed the http://stackoverflow.com/questions/13852180/how-to-get-variable-definition-line-number-etc-using-dbg-metadatain order to get the line number definition for local variables (allocas), which works fine. But I need the same for globals. So I tried to hack the `findDbgGlobalDeclare()` method from http://llvm.org/docs/doxygen/html/DbgInfoPrinter_8cpp_source.html#l00062 . However,
2013 Mar 01
1
[LLVMdev] llvm get annotations
Hi, I solved it. From the ConstantStruct you can call getOperand() multiple times, so "mine" as deep as you can. On Fri, Mar 1, 2013 at 1:41 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > > Hi Sebastian, > > Thanks for the response. > > I already did this : > > I cast the entire annotated expression to Value*. Then, in order to avoid > ugly things like getAsString(), I check if V->getValueID() == > Value::ConstantArrayVal i...
2013 May 03
0
[LLVMdev] set of integers to metadata
...ize]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } llvm::ArrayRef<Value*> bla = values[size]; is->setMetadata("path",MDNode::get(C,bla));* On Fri, May 3, 2013 at 1:18 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > I want to pass a set of integers using metadata but I don't know how. I > have tried: > > the integers are in array[] > > *1. * > LLVMContext& C = is->getContext(); > Value* values[size]; > for(int gy=0;gy&lt...
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
...he end, I just want to apply a DFS on a CFG of a function. And I need oriented edges and wanted to use MachineBasicBlock::const_succ_iterator. It is there a way to get the CFG with oriented edges by using a FunctionPass? Thank you ! On Fri, Mar 15, 2013 at 1:30 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > I have written several complex passes till now, but I cannot write a > MachineFunctionPass pass. It just gives me segfault. Hence I reduced the > pass to the following form : > > > using namespace llvm; > > namespace { &gt...
2013 May 28
1
[LLVMdev] unexpectedly loop hanging
...u use the incorrect one for simple types, you may not notice it. The error you have seems to me like a memory corruption because you went out of bound and corrupted the memory somewhere, Valgrind may help you figure out what is going on. Cheers, Matthieu 2013/5/28 Alexandru Ionut Diaconescu <alexandruionutdiaconescu at gmail.com> > As an update, it is a memory problem which I don't know how to fix. > > I tried to skip the problematic piece of code when in the case when the > loop hangs. So I did something like : > > if( instr ) > { > LLVMContext&a...
2013 Mar 05
5
[LLVMdev] LLVM load instruction query
HI, I am creating a pass that will pass loaded value by load instruction to an external function. I don't know how to do it.Please Help.
2013 Mar 15
2
[LLVMdev] write a simple MachineFunctionPass
Hello everyone, I have written several complex passes till now, but I cannot write a MachineFunctionPass pass. It just gives me segfault. Hence I reduced the pass to the following form : using namespace llvm; namespace { class CFGexplorator : public MachineFunctionPass { public: static char ID; // Pass identification, replacement for typeid CFGexplorator() : MachineFunctionPass(ID)