search for: inst_iterators

Displaying 20 results from an estimated 81 matches for "inst_iterators".

Did you mean: inst_iterator
2004 Apr 23
2
[LLVMdev] subtle problem with inst_iterator
Chris Lattner wrote: > On Fri, 23 Apr 2004, Vladimir Prus wrote: > > and since result of *it is considered to be rvalue it can't be accepted > > by this operator. The complete discussion is in > > > > http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm > > > > I'd suggest to apply the following patch which makes operator* return >
2004 Apr 23
0
[LLVMdev] subtle problem with inst_iterator
On Fri, 23 Apr 2004, Vladimir Prus wrote: > Yea, I've noticed that. However, it looks like inst_iterator is iterator over > pointers. Oh, wait a minite, that's the current code: > > inline IIty operator*() const { return BI; } > inline IIty operator->() const { return operator*(); } > > So operator* works as if value_type is Instruction*, but operator->
2004 Apr 27
2
[LLVMdev] subtle problem with inst_iterator
Chris Lattner wrote: > > inline IIty operator*() const { return BI; } > > inline IIty operator->() const { return operator*(); } > > > > So operator* works as if value_type is Instruction*, but operator-> works > > as if value_type is Instruction. Hmm ;-) > > Yeah, fishy huh? :) Yea, a bit. I've decided that before changing that I'd better
2015 Jun 16
2
[LLVMdev] Program order in inst_iterator?
On 6/16/15 1:09 AM, Nick Lewycky wrote: > Anirudh Sivaraman wrote: >> On Mon, Jun 15, 2015 at 10:50 AM, mats >> petersson<mats at planetcatfish.com> wrote: >>> It will iterate over the instructions in the order that they are >>> stored in >>> the module/function/basicblock that they belong to. And that SHOULD, >>> assuming llvm-dis does
2015 Jun 15
2
[LLVMdev] Program order in inst_iterator?
On Mon, Jun 15, 2015 at 10:50 AM, mats petersson <mats at planetcatfish.com> wrote: > It will iterate over the instructions in the order that they are stored in > the module/function/basicblock that they belong to. And that SHOULD, > assuming llvm-dis does what it is expected to do, be the same order. > Thanks for the reply. What about instruction ordering across basic blocks?
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
On Aug 29, 2011, at 12:38 PM, ret val wrote: > I am looping through all instructions in a Function and depending on > what I found I may or may not insert code. Despite the fact that I'm > only actually inserting *before* instruction I have a infinite loop > when I do something like below. For awhile it was simple enough to > just increment i enough times but now I need
2004 Apr 23
2
[LLVMdev] subtle problem with inst_iterator
Hello, I think there's a rather subtle problem with the inst_iterator. It declares its iterator category as std::bidirectional_iterator_tag but C++ standard requirements for forward iterator (which are included in requirements for bidirection iterator), say that the type of expression *r; should be T&, where 'r' is the iterator and T is its value type. The inst_iterator,
2004 Apr 23
0
[LLVMdev] subtle problem with inst_iterator
On Fri, 23 Apr 2004, Vladimir Prus wrote: > and since result of *it is considered to be rvalue it can't be accepted by > this operator. The complete discussion is in > > http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm > > I'd suggest to apply the following patch which makes operator* return > reference to pointer. It makes my code compile and the rest
2015 Jun 15
2
[LLVMdev] Program order in inst_iterator?
Does inst_iterator (http://llvm.org/docs/ProgrammersManual.html#iterating-over-the-instruction-in-a-function) guarantee that the iterated instructions are in program order: the order of instructions printed by llvm-dis? Thanks in advance, Anirudh
2011 Aug 29
4
[LLVMdev] insertions with inst_iterators?
I am looping through all instructions in a Function and depending on what I found I may or may not insert code. Despite the fact that I'm only actually inserting *before* instruction I have a infinite loop when I do something like below. For awhile it was simple enough to just increment i enough times but now I need something better. for(inst_iterator i = inst_begin(F); i != inst_end(F); ++i)
2004 Apr 27
0
[LLVMdev] subtle problem with inst_iterator
On Tue, 27 Apr 2004, Vladimir Prus wrote: > > Yeah, fishy huh? :) > > Yea, a bit. I've decided that before changing that I'd better find other > problems, if any, so I run inst_iterator via checks provided by > Boost.Iterators. > > First problem is that inst_iterator (and actually InstIterator class template) > is not Assignable, because it has a reference data
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
On Mon, Aug 29, 2011 at 12:38 PM, ret val <retval386 at gmail.com> wrote: > I am looping through all instructions in a Function and depending on > what I found I may or may not insert code. Despite the fact that I'm > only actually inserting *before* instruction I have a infinite loop > when I do something like below. For awhile it was simple enough to > just increment i
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
> When I'm iterating through I only directly add BitCastInsts and a > single CallInst(Im assuming the functions I also created are > elsewhere). Unfortunately it doesnt look like theres is a good way to > convert between the the iterator I and a CallInst *. Am I missing > something? > I'm not entirely sure how this relates to my explanation/suggestion. How does your
2011 Oct 12
2
[LLVMdev] insert ICmpInst/BranchIns in Pass?
In a pass I would like to insert a ICmpInst/BranchInst pair to check if 2 GlobalVariables are equal or not. If they are not I would like to call a function. I've tried splitting the current block and then inserting before the existing instructions, but for some reason this seems to ruin the iterator(i). What is the correct way todo something like this? void checkShadowPtr(Module &M,
2011 Aug 29
2
[LLVMdev] insertions with inst_iterators?
When I'm iterating through I only directly add BitCastInsts and a single CallInst(Im assuming the functions I also created are elsewhere). Unfortunately it doesnt look like theres is a good way to convert between the the iterator I and a CallInst *. Am I missing something? Thanks On Mon, Aug 29, 2011 at 3:59 PM, David Blaikie <dblaikie at gmail.com> wrote: > > > On Mon, Aug
2011 Oct 12
0
[LLVMdev] insert ICmpInst/BranchIns in Pass?
On Tue, Oct 11, 2011 at 7:22 PM, ret val <retval386 at gmail.com> wrote: > In a pass I would like to insert a ICmpInst/BranchInst pair to check > if 2 GlobalVariables are equal or not. If they are not I would like to > call a function. I've tried splitting the current block and then > inserting before the existing instructions, but for some reason this > seems to ruin the
2016 Nov 28
2
LLVM Pass for Instructions in Function (error
Hi, Sent via the Samsung Galaxy NoteĀ® 3, an AT&T 4G LTE smartphone -------- Original message -------- From: Gurunath Kadam via llvm-dev <llvm-dev at lists.llvm.org> Date: 11/27/2016 7:49 PM (GMT-06:00) To: llvm-dev at lists.llvm.org Subject: [llvm-dev] LLVM Pass for Instructions in Function (error Hi, Please find the embedded code. Also you may follow
2011 Sep 28
3
[LLVMdev] ICmpInst example?
I'm trying to come up with a simple example of using ICmpInst in a Pass. On each of the branches(true, false) I'd like to call a separate function and then resume(to the code that was already there). In this example i is a inst_iterator to Instruction the Pass is currently on. Now it segfaults opt before I can even get a dump() on it. Does anyone see what I am doing wrong? BasicBlock
2016 Nov 28
2
LLVM Pass for Instructions in Function (error
> On Nov 27, 2016, at 6:40 PM, Gurunath Kadam via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi Sandeep, > > Thanks. > > One question about: > > Value* AddrPointer = Inst->getIperand(0); > > So this works for LVALUE(S) i.e. in my case pointer on LHS of '='. I cannot find anything online about getloperand online. > > For reference
2018 Aug 08
2
Error Calling eraseFromParent()
Hi. Thanks. I changed the code but the problem exists. This is my new code which is again very simple: ... bool runOnFunction(Function &F) override { vector<Instruction *> dels; dels.clear(); for (inst_iterator It = inst_begin(&F), Ie = inst_end(&F); It != Ie;) { Instruction *I = &*(It++); if (auto* op = dyn_cast<BinaryOperator>(I)) { IRBuilder<NoFolder>