<div dir="ltr">I see. Thanks.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 21, 2015 at 3:43 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes.<br>
So if you want the instruction after it, increase the iterator by 1.<br>
If Iterator + 1 was after BB->end() you had a bug anyway unless you<br>
were replacing the terminator :)<br>
<br>
<br>
<br>
On Tue, Apr 21, 2015 at 3:40 PM, zhi chen <<a href="mailto:zchenhn@gmail.com">zchenhn@gmail.com</a>> wrote:<br>
> Does the insert point also mean inserting before the instruction?<br>
<div class="HOEnZb"><div class="h5">><br>
> On Tue, Apr 21, 2015 at 3:36 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
>><br>
>> IRBuilder takes an insertion point.<br>
>> Use it?<br>
>><br>
>><br>
>> On Tue, Apr 21, 2015 at 3:17 PM, zhi chen <<a href="mailto:zchenhn@gmail.com">zchenhn@gmail.com</a>> wrote:<br>
>> > The current instruction is:<br>
>> ><br>
>> > Instruction *pInst;<br>
>> ><br>
>> > How can I create a new instruction, say add, after pInst?<br>
>> ><br>
>> > Thanks,<br>
>> > Zhi<br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="color:rgb(51,51,51)">PhD Student</span><br></div><div><font color="#333333">Department of Computer Science</font></div><div><font color="#333333">University of California, Irvine</font></div></div></div></div></div>
</div>