search for: classllvm_1_1use

Displaying 9 results from an estimated 9 matches for "classllvm_1_1use".

2015 Jun 10
4
[LLVMdev] The use iterator not working...
...{ >> > > 'user' != 'use'. > > Think of llvm::Use as the edge between the place where a value is > produced, and the place where that value is consumed. The consumer is the > 'User', and the Use points at it. > > http://llvm.org/docs/doxygen/html/classllvm_1_1Use.html > > The confusing thing that's happening below is that the llvm::Use is > implicitly converted via `llvm::Use::operator Value *() const` to a > `Value*`, and that `Value*` is `pDef`. > > > HTH, > > Jon > > Instruction* pUse = dyn_cast&...
2012 Jun 21
0
[LLVMdev] Cloning block for newbie
...programmer's manual[1], and loop over the operands using User's op_iterators[2] checking to see if they have entries in ValueMap[3]. If they do, you set that operand to use ValueMap's entry. [1] http://llvm.org/docs/ProgrammersManual.html#iterate_basicblock [2] http://llvm.org/doxygen/classllvm_1_1User.html [3] http://llvm.org/doxygen/classllvm_1_1ValueMap.html On Thu, Jun 21, 2012 at 1:49 PM, Nileih Cimeil <nileih at gmail.com> wrote: > Thank you for your quick answer... > > > "You can loop over the instruction's operands to see if they are > contained in VMap&quo...
2015 Jun 10
2
[LLVMdev] The use iterator not working...
...>> > >> Think of llvm::Use as the edge between the place where a value is > >> produced, and the place where that value is consumed. The consumer is > the > >> 'User', and the Use points at it. > >> > >> http://llvm.org/docs/doxygen/html/classllvm_1_1Use.html > >> > >> The confusing thing that's happening below is that the llvm::Use is > >> implicitly converted via `llvm::Use::operator Value *() const` to a > >> `Value*`, and that `Value*` is `pDef`. > >> > >> > >> HTH, > >&gt...
2015 Mar 02
2
[LLVMdev] Walking thru CallGraph bottom up
...t to the basic block which has a method to get to the Funciton. In both cases, the method is called getParent(). Once you get the Function, you can find all the internal uses using the use chain from the Function. > > Start looking at the user class here: > > http://llvm.org/doxygen/classllvm_1_1User.html > > When you go through the user chain, you will find all sorts of instructions and possibly other things. If you find anything other than a call Instruction, you have hit upon a case that's more difficult to handle (related to using function pointer). If you run whatever analysi...
2015 Jun 10
3
[LLVMdev] The use iterator not working...
Hi, I'm having a problem with the use iterator. Each "use" that I see, when using the use_iterator, is the same as the "def". Meaning, in the code below the pDef is always equal to pUse pointer for every instruction in all basic blocks (except terminators). for (auto i = inst_begin(f), ie = inst_end(f); i != ie; ++i) Instruction* pDef =
2012 Jun 21
3
[LLVMdev] Cloning block for newbie
Hello everybody. I'm quite new to LLVM and I'm encontering problems with cloning basic blocks. My two basic blocks are in the same function and it doesn't really matter how the cloned one behave for the moment. Of course, to do so, I used the cloning.h 's method "CloneBasicBlock" but I have the "Instruction does not dominate all uses!" error. I know what it
2012 Jun 22
1
[LLVMdev] Cloning block for newbie
...[1], and loop over the operands using User's > op_iterators[2] checking to see if they have entries in ValueMap[3]. > If they do, you set that operand to use ValueMap's entry. > > [1] http://llvm.org/docs/ProgrammersManual.html#iterate_basicblock > [2] http://llvm.org/doxygen/classllvm_1_1User.html > [3] http://llvm.org/doxygen/classllvm_1_1ValueMap.html > > On Thu, Jun 21, 2012 at 1:49 PM, Nileih Cimeil <nileih at gmail.com> wrote: > > Thank you for your quick answer... > > > > > > "You can loop over the instruction's operands to see if t...
2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...p://llvm.org/docs/doxygen/html/classllvm_1_1PHINode.html#a4c25b6c00c4867281779c81ab64d2081>(i)->getTerminator <http://llvm.org/docs/doxygen/html/classllvm_1_1BasicBlock.html#a5cb76a65b6524dba1493dd2b9dc3abbe>();00238 TI->replaceUsesOfWith <http://llvm.org/docs/doxygen/html/classllvm_1_1User.html#a1f0b9358936e3e00c42a460abbfb2868>(OldPred, NewBB);00239 }00240 00241 // Okay, everything within the region is now branching to the right block, we00242 // just have to update the PHI nodes now, inserting PHI nodes into NewBB.00243 for (AfterPHIs = OldPred->begin <http:...
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]